Skip to content

Instance Method

query(_:logger:file:line:)

Run a query on the Postgres server the client is connected to.
@discardableResult func query(_ query: PostgresQuery, logger: Logger? = nil, file: String = #fileID, line: Int = #line) async throws -> PostgresRowSequence

Parameters

query

The PostgresQuery to run

logger

The Logger to log into for the query

file

The file the query was started in. Used for better error reporting.

line

The line the query was started in. Used for better error reporting.

Return Value

A PostgresRowSequence containing the rows the server sent as the query result. The sequence can be discarded.