Skip to content

Commit f6b8ca6

Browse files
authored
nio 2 final (#18)
1 parent e8e10ef commit f6b8ca6

File tree

6 files changed

+10
-14
lines changed

6 files changed

+10
-14
lines changed

Package.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ let package = Package(
88
.executable(name: "NIOPostgresBenchmark", targets: ["NIOPostgresBenchmark"]),
99
],
1010
dependencies: [
11-
.package(url: "https://github.com/apple/swift-nio.git", from: "2.0.0-convergence"),
12-
.package(url: "https://github.com/apple/swift-nio-ssl.git", from: "2.0.0-convergence"),
11+
.package(url: "https://github.com/apple/swift-nio.git", from: "2.0.0"),
12+
.package(url: "https://github.com/apple/swift-nio-ssl.git", from: "2.0.0"),
1313
],
1414
targets: [
1515
.target(name: "CMD5", dependencies: []),
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#warning("TODO: make this protocol more general, not depend on PostgresRequestHandler")
2-
public protocol PostgresDatabase {
2+
public protocol PostgresClient {
33
var eventLoop: EventLoop { get }
44
func send(_ request: PostgresRequestHandler) -> EventLoopFuture<Void>
55
}
66

7-
extension PostgresConnection: PostgresDatabase { }
7+
extension PostgresConnection: PostgresClient { }

Sources/NIOPostgres/Connection/PostgresDatabase+Query.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import NIO
22

3-
extension PostgresDatabase {
3+
extension PostgresClient {
44
public func query(_ string: String, _ binds: [PostgresData] = []) -> EventLoopFuture<[PostgresRow]> {
55
var rows: [PostgresRow] = []
66
return query(string, binds) { rows.append($0) }.map { rows }

Sources/NIOPostgres/Connection/PostgresDatabase+SimpleQuery.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import NIO
22

3-
extension PostgresDatabase {
3+
extension PostgresClient {
44
public func simpleQuery(_ string: String) -> EventLoopFuture<[PostgresRow]> {
55
var rows: [PostgresRow] = []
66
return simpleQuery(string) { rows.append($0) }.map { rows }

Tests/NIOPostgresTests/NIOPostgresTests.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,6 @@ final class NIOPostgresTests: XCTestCase {
263263

264264
func testSelectPerformance() throws {
265265
// std deviation too high
266-
return;
267266
let conn = try PostgresConnection.test(on: eventLoop).wait()
268267
measure {
269268
do {
@@ -276,7 +275,6 @@ final class NIOPostgresTests: XCTestCase {
276275

277276
func testRangeSelectPerformance() throws {
278277
// std deviation too high
279-
return;
280278
let conn = try PostgresConnection.test(on: eventLoop).wait()
281279
measure {
282280
do {
@@ -289,7 +287,6 @@ final class NIOPostgresTests: XCTestCase {
289287

290288
func testRangeSelectDecodePerformance() throws {
291289
// std deviation too high
292-
return;
293290
struct Series: Decodable {
294291
var num: Int
295292
}

circle.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: 2
33
jobs:
44
11-linux:
55
docker:
6-
- image: codevapor/swift:5.0
6+
- image: vapor/swift:5.0
77
- image: circleci/postgres:11
88
name: psql
99
environment:
@@ -16,7 +16,7 @@ jobs:
1616
- run: swift test
1717
10-linux:
1818
docker:
19-
- image: codevapor/swift:5.0
19+
- image: vapor/swift:5.0
2020
- image: circleci/postgres:10
2121
name: psql
2222
environment:
@@ -29,7 +29,7 @@ jobs:
2929
- run: swift test
3030
9-linux:
3131
docker:
32-
- image: codevapor/swift:5.0
32+
- image: vapor/swift:5.0
3333
- image: circleci/postgres:9
3434
name: psql
3535
environment:
@@ -42,7 +42,7 @@ jobs:
4242
- run: swift test
4343
linux-release:
4444
docker:
45-
- image: codevapor/swift:5.0
45+
- image: vapor/swift:5.0
4646
steps:
4747
- checkout
4848
- run: swift build -c release
@@ -54,4 +54,3 @@ workflows:
5454
- 10-linux
5555
- 9-linux
5656
- linux-release
57-

0 commit comments

Comments
 (0)