File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
Sources/PostgresNIO/Connection Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -438,7 +438,9 @@ extension PostgresConnection {
438438 }
439439 }
440440
441- /// Run a query on the Postgres server the connection is connected to.
441+ /// Run a simple text-only query on the Postgres server the connection is connected to.
442+ /// WARNING: This functions is not yet API and is incomplete.
443+ /// The return type will change to another stream.
442444 ///
443445 /// - Parameters:
444446 /// - query: The simple query to run
@@ -448,7 +450,7 @@ extension PostgresConnection {
448450 /// - Returns: A ``PostgresRowSequence`` containing the rows the server sent as the query result.
449451 /// The sequence be discarded.
450452 @discardableResult
451- public func simpleQuery (
453+ public func __simpleQuery (
452454 _ query: String ,
453455 logger: Logger ,
454456 file: String = #fileID,
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ final class AsyncPostgresConnectionTests: XCTestCase {
3232
3333 try await withTestConnection ( on: eventLoop) { connection in
3434 for _ in 0 ..< 1_000 {
35- let rows = try await connection. simpleQuery ( " SELECT version() " , logger: . psqlTest)
35+ let rows = try await connection. __simpleQuery ( " SELECT version() " , logger: . psqlTest)
3636 var iterator = rows. makeAsyncIterator ( )
3737 let firstRow = try await iterator. next ( )
3838 XCTAssertEqual ( try firstRow? . decode ( String . self, context: . default) . contains ( " PostgreSQL " ) , true )
@@ -50,7 +50,7 @@ final class AsyncPostgresConnectionTests: XCTestCase {
5050 try await withTestConnection ( on: eventLoop) { connection in
5151 for _ in 0 ..< 1_000 {
5252 let nonExistentOID = 1928394819
53- let rows = try await connection. simpleQuery ( " SELECT * FROM pg_class WHERE oid = \( nonExistentOID) " , logger: . psqlTest)
53+ let rows = try await connection. __simpleQuery ( " SELECT * FROM pg_class WHERE oid = \( nonExistentOID) " , logger: . psqlTest)
5454 var iterator = rows. makeAsyncIterator ( )
5555 let first = try await iterator. next ( )
5656 XCTAssertEqual ( first, nil )
You can’t perform that action at this time.
0 commit comments