-
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
851a36d
commit d682d7f
Showing
8 changed files
with
118 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
github: [tanner0101] # loganwright, joscdk | ||
open_collective: vapor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: test | ||
on: | ||
- pull_request | ||
jobs: | ||
xenial: | ||
container: | ||
image: vapor/swift:5.1-xenial | ||
services: | ||
psql: | ||
image: postgres | ||
ports: | ||
- 5432:5432 | ||
env: | ||
POSTGRES_USER: vapor_username | ||
POSTGRES_DB: vapor_database | ||
POSTGRES_PASSWORD: vapor_password | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- run: swift test | ||
bionic: | ||
container: | ||
image: vapor/swift:5.1-bionic | ||
services: | ||
psql: | ||
image: postgres | ||
ports: | ||
- 5432:5432 | ||
env: | ||
POSTGRES_USER: vapor_username | ||
POSTGRES_DB: vapor_database | ||
POSTGRES_PASSWORD: vapor_password | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- run: swift test | ||
thread: | ||
container: | ||
image: vapor/swift:5.1-bionic | ||
services: | ||
psql: | ||
image: postgres | ||
ports: | ||
- 5432:5432 | ||
env: | ||
POSTGRES_USER: vapor_username | ||
POSTGRES_DB: vapor_database | ||
POSTGRES_PASSWORD: vapor_password | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- run: swift test --sanitize=thread |
19 changes: 0 additions & 19 deletions
19
Sources/FluentPostgresDriver/ConnectionPool+Database.swift
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 29 additions & 9 deletions
38
Sources/FluentPostgresDriver/PostgresConnection+Database.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
extension PostgresRow: DatabaseOutput { | ||
extension PostgresRow: DatabaseRow { | ||
public func contains(field: String) -> Bool { | ||
return self.column(field) != nil | ||
} | ||
|
||
public func decode<T>(field: String, as type: T.Type) throws -> T where T : Decodable { | ||
public func decode<T>( | ||
field: String, | ||
as type: T.Type, | ||
for database: Database | ||
) throws -> T where T : Decodable { | ||
return try self.decode(column: field, as: T.self) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.