Skip to content

Instance Method

query(_:logger:file:line:)

Run a query on the Postgres server the connection is connected to and collect all rows.
func query(_ query: PostgresQuery, logger: Logger, file: String = #fileID, line: Int = #line) -> EventLoopFuture<PostgresQueryResult>

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

An EventLoopFuture, that allows access to the future PostgresQueryResult.