Skip to content

Commit c8f8823

Browse files
committed
update to dbkit beta 3 & remove connection config
1 parent 29b446c commit c8f8823

File tree

5 files changed

+4
-25
lines changed

5 files changed

+4
-25
lines changed

Diff for: Package.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ let package = Package(
1717
.package(url: "https://github.com/vapor/crypto.git", "3.0.0-beta.1"..<"3.0.0-beta.2"),
1818

1919
// Core services for creating database integrations.
20-
.package(url: "https://github.com/vapor/database-kit.git", "1.0.0-beta.2"..<"1.0.0-beta.3"),
20+
.package(url: "https://github.com/vapor/database-kit.git", "1.0.0-beta.3"..<"1.0.0-beta.4"),
2121

2222
// Non-blocking networking for Swift (HTTP and WebSockets).
2323
.package(url: "https://github.com/vapor/engine.git", "3.0.0-beta.2"..<"3.0.0-beta.3"),

Diff for: Sources/PostgreSQL/Data/PostgreSQLData.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public struct PostgreSQLData {
2121
extension PostgreSQLData: CustomStringConvertible {
2222
/// See `CustomStringConvertible.description`
2323
public var description: String {
24-
return "\(type) (\(format)) \(data?.hexDebug ?? "nil")"
24+
return "\(type) (\(format)) \(data?.hexDebug ?? "null")"
2525
}
2626
}
2727

Diff for: Sources/PostgreSQL/Database/PostgreSQLConnectionConfig.swift

-10
This file was deleted.

Diff for: Sources/PostgreSQL/Database/PostgreSQLDatabase.swift

+2-5
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public final class PostgreSQLDatabase: Database {
1414
}
1515

1616
/// See `Database.makeConnection()`
17-
public func makeConnection(using connectionConfig: PostgreSQLConnectionConfig, on worker: Worker) -> Future<PostgreSQLConnection> {
17+
public func makeConnection(on worker: Worker) -> Future<PostgreSQLConnection> {
1818
do {
1919
let client = try PostgreSQLConnection.connect(hostname: config.hostname, port: config.port, on: worker) { _, error in
2020
print("[PostgreSQL] \(error)")
@@ -32,10 +32,7 @@ public final class PostgreSQLDatabase: Database {
3232
}
3333

3434
/// A connection created by a `PostgreSQLDatabase`.
35-
extension PostgreSQLConnection: DatabaseConnection {
36-
/// See `DatabaseConnection.Config`
37-
public typealias Config = PostgreSQLConnectionConfig
38-
}
35+
extension PostgreSQLConnection: DatabaseConnection { }
3936

4037
extension DatabaseIdentifier {
4138
/// Default identifier for `PostgreSQLDatabase`.

Diff for: Sources/PostgreSQL/PostgreSQLProvider.swift

-8
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ public final class PostgreSQLProvider: Provider {
1111
/// See `Provider.register`
1212
public func register(_ services: inout Services) throws {
1313
try services.register(DatabaseKitProvider())
14-
services.register(PostgreSQLConnectionConfig.self)
1514
services.register(PostgreSQLDatabaseConfig.self)
1615
services.register(PostgreSQLDatabase.self)
1716
var databases = DatabaseConfig()
@@ -25,13 +24,6 @@ public final class PostgreSQLProvider: Provider {
2524

2625
/// MARK: Services
2726

28-
extension PostgreSQLConnectionConfig: ServiceType {
29-
/// See `ServiceType.makeService(for:)`
30-
public static func makeService(for worker: Container) throws -> PostgreSQLConnectionConfig {
31-
return .default()
32-
}
33-
}
34-
3527
extension PostgreSQLDatabaseConfig: ServiceType {
3628
/// See `ServiceType.makeService(for:)`
3729
public static func makeService(for worker: Container) throws -> PostgreSQLDatabaseConfig {

0 commit comments

Comments
 (0)