File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -163,7 +163,7 @@ struct PostgresDialect: SQLDialect {
163
163
}
164
164
165
165
extension PostgresConnection : SQLDatabase { }
166
- extension SQLDatabase where Self: PostgresDatabase {
166
+ extension SQLDatabase where Self: PostgresClient {
167
167
public func sqlQuery( _ query: SQLExpression , _ onRow: @escaping ( SQLRow ) throws -> ( ) ) -> EventLoopFuture < Void > {
168
168
var serializer = SQLSerializer ( dialect: PostgresDialect ( ) )
169
169
query. serialize ( to: & serializer)
@@ -176,7 +176,7 @@ extension SQLDatabase where Self: PostgresDatabase {
176
176
}
177
177
178
178
#warning("TODO: move to NIOPostgres?")
179
- extension ConnectionPool : PostgresDatabase where Source. Connection: PostgresDatabase {
179
+ extension ConnectionPool : PostgresClient where Source. Connection: PostgresClient {
180
180
public var eventLoop : EventLoop {
181
181
return self . source. eventLoop
182
182
}
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ class PostgresKitTests: XCTestCase {
20
20
21
21
func testSQLKitBenchmark( ) throws {
22
22
let conn = try PostgresConnection . test ( on: self . eventLoop) . wait ( )
23
+ defer { try ! conn. close ( ) . wait ( ) }
23
24
let benchmark = SQLBenchmarker ( on: conn)
24
25
try benchmark. run ( )
25
26
}
@@ -30,6 +31,7 @@ class PostgresKitTests: XCTestCase {
30
31
on: self . eventLoop
31
32
)
32
33
let pool = ConnectionPool ( config: . init( maxConnections: 12 ) , source: db)
34
+ defer { try ! pool. close ( ) . wait ( ) }
33
35
self . measure {
34
36
for i in 1 ... 100 {
35
37
_ = try ! pool. withConnection { conn in
You can’t perform that action at this time.
0 commit comments