Instance Method
first(decoding:with:)
Using the given
SQLRowDecoder, returns the first output row, if any, decoded as a given type.func first<D>(decoding type: D.Type, with decoder: SQLRowDecoder) -> EventLoopFuture<D?> where D : Decodable, D : SendableMetatype
Parameters
typeThe type of the desired value.
decoderA configured
SQLRowDecoderto use.
Return Value
A future containing the decoded value, if any.
See Also
Legacy `EventLoopFuture` Interfaces
run(_:)Run the query specified by the builder, calling the provided handler closure with each output row, if any, as it is received.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.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.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.all()Returns all output rows, if any.all(decoding:)Using a default-configuredSQLRowDecoder, returns all output rows, if any, decoded as a given type.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.all(decoding:with:)Using the givenSQLRowDecoder, returns the output rows, if any, decoded as a given type.all(decodingColumn:as:)Returns the named column from each output row, if any, decoded as a given type.first()Returns the first output row, if any.first(decoding:)Using a default-configuredSQLRowDecoder, returns the first output row, if any, decoded as a given type.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.first(decodingColumn:as:)Returns the named column from the first output row, if any, decoded as a given type.