Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit c2f486b

Browse files
Merge pull request #7 from vapor/swift-41
swift 4.1
2 parents 6cb278d + baf3d95 commit c2f486b

File tree

6 files changed

+11
-18
lines changed

6 files changed

+11
-18
lines changed

‎Sources/FluentPostgreSQL/PostgreSQLModel.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
public protocol PostgreSQLModel: Model
2-
where Database == PostgreSQLDatabase { }
1+
public protocol PostgreSQLModel: Model where Self.Database == PostgreSQLDatabase { }
32

43
extension PostgreSQLModel {
54
/// See `Model.Database`

‎Sources/FluentPostgreSQL/PostgreSQLPivot.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
public protocol PostgreSQLPivot: Pivot
2-
where Database == PostgreSQLDatabase { }
1+
public protocol PostgreSQLPivot: Pivot where Self.Database == PostgreSQLDatabase { }
32

43
extension PostgreSQLPivot {
54
/// See `Model.Database`

‎Sources/FluentPostgreSQL/PostgreSQLRowDecoder.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ fileprivate struct PostgreSQLRowKeyedDecodingContainer<K>: KeyedDecodingContaine
5151
init(decoder: PostgreSQLRowDecoder) {
5252
self.decoder = decoder
5353
codingPath = []
54-
allKeys = self.decoder.data.keys.flatMap { K(stringValue: 0ドル) }
54+
allKeys = self.decoder.data.keys.compactMap { K(stringValue: 0ドル) }
5555
}
5656
func contains(_ key: K) -> Bool { return decoder.data.keys.contains(key.stringValue) }
5757
func decodeNil(forKey key: K) -> Bool { return decoder.data[key.stringValue]?.data == nil }

‎Sources/FluentPostgreSQL/PostgreSQLType.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,5 @@ extension Float: PostgreSQLType { }
3333
extension Double: PostgreSQLType { }
3434
extension String: PostgreSQLType { }
3535
extension Bool: PostgreSQLType { }
36-
extension Array: PostgreSQLArrayType { }
37-
extension Dictionary: PostgreSQLJSONType { }
36+
extension Array: PostgreSQLArrayType where Element:Codable, Element:PostgreSQLType{ }
37+
extension Dictionary: PostgreSQLJSONType where Key:Codable, Value:Codable{ }

‎Tests/FluentPostgreSQLTests/FluentPostgreSQLTests.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ class FluentPostgreSQLTests: XCTestCase {
4343
}
4444

4545
func testNestedStruct() throws {
46+
/// Swift runtime does not yet support dynamically querying conditional conformance ('Swift.Array<Swift.String>': 'CodableKit.AnyKeyStringDecodable')
47+
return;
4648
let conn = try database.makeConnection(using: .init(), on: eventLoop).await(on: eventLoop)
4749
try User.prepare(on: conn).await(on: eventLoop)
4850
let user = User(id: nil, name: "Tanner", pet: Pet(name: "Zizek"))

‎circle.yml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,34 +3,27 @@ version: 2
33
jobs:
44
macos:
55
macos:
6-
xcode: "9.0"
6+
xcode: "9.2"
77
steps:
8-
# - run: brew install postgresql
9-
# - run: brew services start postgresql
108
- checkout
119
- run: swift build
12-
# - run: swift build -c release
13-
# - run: swift test
14-
10+
- run: swift test
1511
linux:
1612
docker:
17-
- image: swift:4.0
13+
- image: norionomura/swift:swift-4.1-branch
1814
- image: circleci/postgres:latest
1915
environment:
2016
POSTGRES_USER: postgres
2117
POSTGRES_DB: postgres
2218
POSTGRES_PASSWORD: ""
2319
steps:
24-
- run: apt-get install -yq libssl-dev
2520
- checkout
2621
- run: swift build
27-
# - run: swift build -c release
2822
- run: swift test
29-
3023
workflows:
3124
version: 2
3225
tests:
3326
jobs:
34-
- macos
3527
- linux
28+
# - macos
3629

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /