Instance Method
all(decoding:prefix:keyDecodingStrategy:userInfo:)
Configure a new
SQLRowDecoder as specified and use it to decode and return the output rows, if any, as a given type.func all<D>(decoding type: D.Type, prefix: String? = nil, keyDecodingStrategy: SQLRowDecoder.KeyDecodingStrategy = .useDefaultKeys, userInfo: [CodingUserInfoKey : any Sendable] = [:]) -> EventLoopFuture<[D]> where D : Decodable, D : SendableMetatype
Parameters
typeThe type of the desired values.
prefixSee
prefix.keyDecodingStrategySee
keyDecodingStrategy.userInfoSee
userInfo.
Return Value
A future containing the decoded values, if any.
See Also
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, 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.