Skip to content

Commit 50b9d47

Browse files
committed
global #func linux fix
1 parent 8f9e1ca commit 50b9d47

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

Sources/FluentPostgreSQL/PostgreSQLRowDecoder.swift

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ internal final class PostgreSQLRowDecoder: Decoder {
1414
}
1515

1616
func unkeyedContainer() throws -> UnkeyedDecodingContainer {
17-
throw unsupported
17+
throw unsupported()
1818
}
1919

2020
func singleValueContainer() throws -> SingleValueDecodingContainer {
21-
throw unsupported
21+
throw unsupported()
2222
}
2323

2424
func require(key: CodingKey) throws -> PostgreSQLData {
@@ -30,13 +30,15 @@ internal final class PostgreSQLRowDecoder: Decoder {
3030

3131
}
3232

33-
private let unsupported = PostgreSQLError(
34-
identifier: "rowDecode",
35-
reason: "PostgreSQL rows only support a flat, keyed structure `[String: T]`",
36-
suggestedFixes: [
37-
"You can conform nested types to `PostgreSQLJSONType` or `PostgreSQLArrayType`. (Nested types must be `PostgreSQLDataCustomConvertible`.)"
38-
]
39-
)
33+
private func unsupported() -> PostgreSQLError {
34+
return PostgreSQLError(
35+
identifier: "rowDecode",
36+
reason: "PostgreSQL rows only support a flat, keyed structure `[String: T]`",
37+
suggestedFixes: [
38+
"You can conform nested types to `PostgreSQLJSONType` or `PostgreSQLArrayType`. (Nested types must be `PostgreSQLDataCustomConvertible`.)"
39+
]
40+
)
41+
}
4042

4143

4244
fileprivate struct PostgreSQLRowKeyedDecodingContainer<K>: KeyedDecodingContainerProtocol

0 commit comments

Comments
 (0)