Skip to content

Commit f2b0844

Browse files
authored
Update to match FluentKit's declared version minimums (#204)
1 parent 44247df commit f2b0844

6 files changed

+18
-7
lines changed

Package.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
// swift-tools-version:5.5
1+
// swift-tools-version:5.5.2
22
import PackageDescription
33

44
let package = Package(
55
name: "fluent-postgres-driver",
66
platforms: [
7-
.macOS(.v10_15)
7+
.macOS(.v10_15),
8+
.iOS(.v13),
9+
.watchOS(.v6)
810
],
911
products: [
1012
.library(name: "FluentPostgresDriver", targets: ["FluentPostgresDriver"]),

Sources/FluentPostgresDriver/FluentPostgresConfiguration.swift

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
import Logging
22
import FluentKit
3+
import AsyncKit
34
import NIOCore
5+
import NIOSSL
6+
import Foundation
47
import PostgresKit
58

69
extension DatabaseConfigurationFactory {
710
public static func postgres(
811
url urlString: String,
912
maxConnectionsPerEventLoop: Int = 1,
10-
connectionPoolTimeout: NIO.TimeAmount = .seconds(10),
13+
connectionPoolTimeout: TimeAmount = .seconds(10),
1114
encoder: PostgresDataEncoder = .init(),
1215
decoder: PostgresDataDecoder = .init(),
1316
sqlLogLevel: Logger.Level = .debug
@@ -28,7 +31,7 @@ extension DatabaseConfigurationFactory {
2831
public static func postgres(
2932
url: URL,
3033
maxConnectionsPerEventLoop: Int = 1,
31-
connectionPoolTimeout: NIO.TimeAmount = .seconds(10),
34+
connectionPoolTimeout: TimeAmount = .seconds(10),
3235
encoder: PostgresDataEncoder = .init(),
3336
decoder: PostgresDataDecoder = .init(),
3437
sqlLogLevel: Logger.Level = .debug
@@ -52,7 +55,7 @@ extension DatabaseConfigurationFactory {
5255
database: String? = nil,
5356
tlsConfiguration: TLSConfiguration? = nil,
5457
maxConnectionsPerEventLoop: Int = 1,
55-
connectionPoolTimeout: NIO.TimeAmount = .seconds(10),
58+
connectionPoolTimeout: TimeAmount = .seconds(10),
5659
encoder: PostgresDataEncoder = .init(),
5760
decoder: PostgresDataDecoder = .init(),
5861
sqlLogLevel: Logger.Level = .debug
@@ -75,7 +78,7 @@ extension DatabaseConfigurationFactory {
7578
public static func postgres(
7679
configuration: PostgresConfiguration,
7780
maxConnectionsPerEventLoop: Int = 1,
78-
connectionPoolTimeout: NIO.TimeAmount = .seconds(10),
81+
connectionPoolTimeout: TimeAmount = .seconds(10),
7982
encoder: PostgresDataEncoder = .init(),
8083
decoder: PostgresDataDecoder = .init(),
8184
sqlLogLevel: Logger.Level = .debug
@@ -100,7 +103,7 @@ struct FluentPostgresConfiguration: DatabaseConfiguration {
100103
let maxConnectionsPerEventLoop: Int
101104
/// The amount of time to wait for a connection from
102105
/// the connection pool before timing out.
103-
let connectionPoolTimeout: NIO.TimeAmount
106+
let connectionPoolTimeout: TimeAmount
104107
let encoder: PostgresDataEncoder
105108
let decoder: PostgresDataDecoder
106109
let sqlLogLevel: Logger.Level

Sources/FluentPostgresDriver/FluentPostgresDatabase.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import FluentKit
22
import FluentSQL
33
import Logging
44
import PostgresKit
5+
import PostgresNIO
56
import SQLKit
67

78
struct _FluentPostgresDatabase {

Sources/FluentPostgresDriver/FluentPostgresDriver.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import AsyncKit
2+
import NIOCore
13
import Logging
24
import FluentKit
35
import PostgresKit

Sources/FluentPostgresDriver/PostgresError+Database.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import FluentKit
22
import FluentSQL
33
import PostgresKit
4+
import PostgresNIO
45

56
extension PostgresError: DatabaseError {
67
public var isSyntaxError: Bool {

Sources/FluentPostgresDriver/PostgresRow+Database.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
import PostgresNIO
12
import PostgresKit
23
import FluentKit
4+
import SQLKit
35

46
extension PostgresRow {
57
internal func databaseOutput(using decoder: PostgresDataDecoder) -> DatabaseOutput {

0 commit comments

Comments
 (0)