Skip to content

Commit 4d2c789

Browse files
committed
decouple SimpleQuery from ExtendedQuery
1 parent d8d8abb commit 4d2c789

File tree

7 files changed

+683
-133
lines changed

7 files changed

+683
-133
lines changed

Sources/PostgresNIO/Connection/PostgresConnection.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ extension PostgresConnection {
439439
}
440440

441441
/// 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.
442+
/// WARNING: This function is not yet API and is incomplete.
443443
/// The return type will change to another stream.
444444
///
445445
/// - Parameters:
@@ -460,13 +460,13 @@ extension PostgresConnection {
460460
logger[postgresMetadataKey: .connectionID] = "\(self.id)"
461461

462462
let promise = self.channel.eventLoop.makePromise(of: PSQLRowStream.self)
463-
let context = ExtendedQueryContext(
464-
simpleQuery: query,
463+
let context = SimpleQueryContext(
464+
query: query,
465465
logger: logger,
466466
promise: promise
467467
)
468468

469-
self.channel.write(HandlerTask.extendedQuery(context), promise: nil)
469+
self.channel.write(HandlerTask.simpleQuery(context), promise: nil)
470470

471471
do {
472472
return try await promise.futureResult.map({ $0.asyncSequence() }).get()

0 commit comments

Comments
 (0)