Protocol
SQLQueryFetcher
Common definitions for
SQLQueryBuilders which support retrieving result rows.protocol SQLQueryFetcher : SQLQueryBuilder
Mentioned in
Topics
Getting Rows
func run((any SQLRow) -> ()) async throwsRun the query specified by the builder, calling the provided handler closure with each output row, if any, as it is received.func run<D>(decoding: D.Type, (Result<D, any Error>) -> ()) async throwsUsing a default-configuredSQLRowDecoder, call the provided handler closure with the result of decoding each output row, if any, as a given type.func run<D>(decoding: D.Type, prefix: String?, keyDecodingStrategy: SQLRowDecoder.KeyDecodingStrategy, userInfo: [CodingUserInfoKey : any Sendable], (Result<D, any Error>) -> ()) async throwsConfigure a newSQLRowDecoderas specified, use it to to decode each output row, if any, as a given type, and call the provided handler closure with each decoding result.func run<D>(decoding: D.Type, with: SQLRowDecoder, (Result<D, any Error>) -> ()) async throwsUsing the givenSQLRowDecoder, call the provided handler closure with the result of decoding each output row, if any, as a given type.
Getting All Rows
func all() async throws -> [any SQLRow]Returns all output rows, if any.func all<D>(decoding: D.Type) async throws -> [D]Using a default-configuredSQLRowDecoder, returns all output rows, if any, decoded as a given type.func all<D>(decoding: D.Type, prefix: String?, keyDecodingStrategy: SQLRowDecoder.KeyDecodingStrategy, userInfo: [CodingUserInfoKey : any Sendable]) async throws -> [D]Configure a newSQLRowDecoderas specified and use it to decode and return the output rows, if any, as a given type.func all<D>(decoding: D.Type, with: SQLRowDecoder) async throws -> [D]Using the givenSQLRowDecoder, returns the output rows, if any, decoded as a given type.func all<D>(decodingColumn: String, as: D.Type) async throws -> [D]Returns the named column from each output row, if any, decoded as a given type.
Getting One Row
func first() async throws -> Optional<any SQLRow>Returns the first output row, if any.func first<D>(decoding: D.Type) async throws -> D?Using a default-configuredSQLRowDecoder, returns the first output row, if any, decoded as a given type.func first<D>(decoding: D.Type, prefix: String?, keyDecodingStrategy: SQLRowDecoder.KeyDecodingStrategy, userInfo: [CodingUserInfoKey : any Sendable]) async throws -> D?Configure a newSQLRowDecoderas specified and use it to decode and return the first output row, if any, as a given type.func first<D>(decoding: D.Type, with: SQLRowDecoder) async throws -> D?Using the givenSQLRowDecoder, returns the first output row, if any, decoded as a given type.func first<D>(decodingColumn: String, as: D.Type) async throws -> D?Returns the named column from the first output row, if any, decoded as a given type.
Legacy `EventLoopFuture` Interfaces
func run((any SQLRow) -> ()) -> EventLoopFuture<Void>Run the query specified by the builder, calling the provided handler closure with each output row, if any, as it is received.func run<D>(decoding: D.Type, (Result<D, any Error>) -> ()) -> EventLoopFuture<Void>Using a default-configuredSQLRowDecoder, call the provided handler closure with the result of decoding each output row, if any, as a given type.func run<D>(decoding: D.Type, prefix: String?, keyDecodingStrategy: SQLRowDecoder.KeyDecodingStrategy, userInfo: [CodingUserInfoKey : any Sendable], (Result<D, any Error>) -> ()) -> EventLoopFuture<Void>Configure a newSQLRowDecoderas specified, use it to to decode each output row, if any, as a given type, and call the provided handler closure with each decoding result.func run<D>(decoding: D.Type, with: SQLRowDecoder, (Result<D, any Error>) -> ()) -> EventLoopFuture<Void>Using the givenSQLRowDecoder, call the provided handler closure with the result of decoding each output row, if any, as a given type.func all() -> EventLoopFuture<[any SQLRow]>Returns all output rows, if any.func all<D>(decoding: D.Type) -> EventLoopFuture<[D]>Using a default-configuredSQLRowDecoder, returns all output rows, if any, decoded as a given type.func all<D>(decoding: D.Type, prefix: String?, keyDecodingStrategy: SQLRowDecoder.KeyDecodingStrategy, userInfo: [CodingUserInfoKey : any Sendable]) -> EventLoopFuture<[D]>Configure a newSQLRowDecoderas specified and use it to decode and return the output rows, if any, as a given type.func all<D>(decoding: D.Type, with: SQLRowDecoder) -> EventLoopFuture<[D]>Using the givenSQLRowDecoder, returns the output rows, if any, decoded as a given type.func all<D>(decodingColumn: String, as: D.Type) -> EventLoopFuture<[D]>Returns the named column from each output row, if any, decoded as a given type.func first() -> EventLoopFuture<(any SQLRow)?>Returns the first output row, if any.func first<D>(decoding: D.Type) -> EventLoopFuture<D?>Using a default-configuredSQLRowDecoder, returns the first output row, if any, decoded as a given type.func first<D>(decoding: D.Type, prefix: String?, keyDecodingStrategy: SQLRowDecoder.KeyDecodingStrategy, userInfo: [CodingUserInfoKey : any Sendable]) -> EventLoopFuture<D?>Configure a newSQLRowDecoderas specified and use it to decode and return the first output row, if any, as a given type.func first<D>(decoding: D.Type, with: SQLRowDecoder) -> EventLoopFuture<D?>Using the givenSQLRowDecoder, returns the first output row, if any, decoded as a given type.func first<D>(decodingColumn: String, as: D.Type) -> EventLoopFuture<D?>Returns the named column from the first output row, if any, decoded as a given type.
Instance Methods
func all()Returns all output rows, if any.func all(decoding:)Using a default-configuredSQLRowDecoder, returns all output rows, if any, decoded as a given type.func all(decoding:prefix:keyDecodingStrategy:userInfo:)Configure a newSQLRowDecoderas specified and use it to decode and return the output rows, if any, as a given type.func all(decoding:with:)Using the givenSQLRowDecoder, returns the output rows, if any, decoded as a given type.func all(decodingColumn:as:)Returns the named column from each output row, if any, decoded as a given type.func first()Returns the first output row, if any.func first(decoding:)Using a default-configuredSQLRowDecoder, returns the first output row, if any, decoded as a given type.func first(decoding:prefix:keyDecodingStrategy:userInfo:)Configure a newSQLRowDecoderas specified and use it to decode and return the first output row, if any, as a given type.func first(decoding:with:)Using the givenSQLRowDecoder, returns the first output row, if any, decoded as a given type.func first(decodingColumn:as:)Returns the named column from the first output row, if any, decoded as a given type.func run(_:)Run the query specified by the builder, calling the provided handler closure with each output row, if any, as it is received.func run(decoding:_:)Using a default-configuredSQLRowDecoder, call the provided handler closure with the result of decoding each output row, if any, as a given type.func run(decoding:prefix:keyDecodingStrategy:userInfo:_:)Configure a newSQLRowDecoderas specified, use it to to decode each output row, if any, as a given type, and call the provided handler closure with each decoding result.func run(decoding:with:_:)Using the givenSQLRowDecoder, call the provided handler closure with the result of decoding each output row, if any, as a given type.
Relationships
Inherits From
Conforming Types
See Also
Builder Protocols
protocol SQLAliasedColumnListBuilderCommon definitions for query builders which permit specifying aliased column names.protocol SQLColumnUpdateBuilderCommon definitions for query builders which support assigning values to columns.protocol SQLCommonTableExpressionBuilderCommon definitions for query builders which support Common Table Expressions.protocol SQLCommonUnionBuilderprotocol SQLJoinBuilderCommon definitions for any query builder which permits specifying joins.protocol SQLPartialResultBuilderCommon definitions for any query builder which permits specifying range and ordering behaviors.protocol SQLPredicateBuilderCommon definitions for any query builder which permits specifying a primary predicate.protocol SQLQueryBuilderBase definitions for builders which set up queries and execute them against a given database.protocol SQLReturningBuilderCommon definitions for any query builder which can return values from data-mutating queries.protocol SQLSecondaryPredicateBuilderCommon definitions for any query builder which permits specifying a secondary predicate.protocol SQLSubqueryClauseBuilderA builder which can construct - but not execute - a completeSELECTquery. Useful for building CTEs,CREATE TABLE ... SELECTclauses, etc., not to mention actualSELECTqueries.protocol SQLUnqualifiedColumnListBuilderCommon definitions for query builders which permit or require specifying a list of unqualified column names.