Skip to content

Commit 8cee09b

Browse files
authored
Merge branch 'master' into patch-1
2 parents d07bc7a + 56b0685 commit 8cee09b

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33
/Packages
44
/*.xcodeproj
55
Package.resolved
6+
DerivedData
67

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
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">

Sources/FluentPostgreSQL/PostgreSQLTableNameCache.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import Async
33
/// Caches table OID to string name associations.
44
final 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
}

0 commit comments

Comments
 (0)