Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions Sources/PostgresNIO/Data/PostgresData+Set.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
extension Set: PostgresDataConvertible where Element: PostgresDataConvertible {
public static var postgresDataType: PostgresDataType {
[Element].postgresDataType
}

public init?(postgresData: PostgresData) {
guard let array = [Element](postgresData: postgresData) else {
return nil
}
self = Set(array)
}

public var postgresData: PostgresData? {
[Element](self).postgresData
}
}
4 changes: 1 addition & 3 deletions Tests/PostgresNIOTests/PostgresNIOTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ final class PostgresNIOTests: XCTestCase {
}

func testRemoteTLSServer() throws {
let url = "postgres://uymgphwj:7_tHbREdRwkqAdu4KoIS7hQnNxr8J1LA@elmer.db.elephantsql.com:5432/uymgphwj"
// postgres://uymgphwj:7_tHbREdRwkqAdu4KoIS7hQnNxr8J1LA@elmer.db.elephantsql.com:5432/uymgphwj
let elg = MultiThreadedEventLoopGroup(numberOfThreads: 1)
defer { try! elg.syncShutdownGracefully() }

Expand Down Expand Up @@ -793,8 +793,6 @@ final class PostgresNIOTests: XCTestCase {
let conn = try PostgresConnection.test(on: eventLoop).wait()
defer { try! conn.close().wait() }

let now = Date()
let uuid = UUID()
try prepareTableToMeasureSelectPerformance(
rowCount: 300_000, batchSize: 5_000,
schema:
Expand Down