File tree Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change 33/Packages
44/* .xcodeproj
55Package.resolved
6+ DerivedData
67
Original file line number Diff line number Diff line change 55 <a href="http://docs.vapor.codes/3.0/">
66 <img src="http://img.shields.io/badge/read_the-docs-2196f3.svg" alt="Documentation">
77 </a>
8- <a href="http ://vapor.team ">
9- <img src="http ://vapor.team/badge .svg" alt="Slack Team">
8+ <a href="https ://discord.gg/vapor ">
9+ <img src="https ://img.shields.io/discord/431917998102675485 .svg" alt="Team Chat ">
1010 </a>
1111 <a href="LICENSE">
1212 <img src="http://img.shields.io/badge/license-MIT-brightgreen.svg" alt="MIT License">
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import Async
33/// Caches table OID to string name associations.
44final class PostgreSQLTableNameCache {
55 /// The internal cache.
6- var storage : [ Int32 : String ]
6+ var storage : [ UInt32 : String ]
77
88 /// Static shared cache, stored by connections.
99 private static var _shared : ThreadSpecificVariable < PostgreSQLTableNameCaches > = . init( )
@@ -22,7 +22,7 @@ final class PostgreSQLTableNameCache {
2222 }
2323
2424 /// Creates a new cache.
25- private init ( _ cache: [ Int32 : String ] ) {
25+ private init ( _ cache: [ UInt32 : String ] ) {
2626 self . storage = cache
2727 }
2828
@@ -37,10 +37,10 @@ final class PostgreSQLTableNameCache {
3737 return Future . map ( on: connection) { existing }
3838 } else {
3939 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 ] = [ : ]
4141
4242 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)
4444 let name = try row. firstValue ( forColumn: " relname " ) !. decode ( String . self)
4545 cache [ oid] = name
4646 }
You can’t perform that action at this time.
0 commit comments