File tree 2 files changed +5
-4
lines changed
2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 3
3
/Packages
4
4
/* .xcodeproj
5
5
Package.resolved
6
+ DerivedData
6
7
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import Async
3
3
/// Caches table OID to string name associations.
4
4
final class PostgreSQLTableNameCache {
5
5
/// The internal cache.
6
- var storage : [ Int32 : String ]
6
+ var storage : [ UInt32 : String ]
7
7
8
8
/// Static shared cache, stored by connections.
9
9
private static var _shared : ThreadSpecificVariable < PostgreSQLTableNameCaches > = . init( )
@@ -22,7 +22,7 @@ final class PostgreSQLTableNameCache {
22
22
}
23
23
24
24
/// Creates a new cache.
25
- private init ( _ cache: [ Int32 : String ] ) {
25
+ private init ( _ cache: [ UInt32 : String ] ) {
26
26
self . storage = cache
27
27
}
28
28
@@ -37,10 +37,10 @@ final class PostgreSQLTableNameCache {
37
37
return Future . map ( on: connection) { existing }
38
38
} else {
39
39
return connection. simpleQuery ( " select oid, relname from pg_class " ) . map ( to: PostgreSQLTableNameCache . self) { rows in
40
- var cache : [ Int32 : String ] = [ : ]
40
+ var cache : [ UInt32 : String ] = [ : ]
41
41
42
42
for row in rows {
43
- let oid = try row. firstValue ( forColumn: " oid " ) !. decode ( Int32 . self)
43
+ let oid = try row. firstValue ( forColumn: " oid " ) !. decode ( UInt32 . self)
44
44
let name = try row. firstValue ( forColumn: " relname " ) !. decode ( String . self)
45
45
cache [ oid] = name
46
46
}
You can’t perform that action at this time.
0 commit comments