Skip to content

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) async throws -> D? where D : Decodable

Parameters

type

The type of the desired value.

decoder

A configured SQLRowDecoder to use.

Return Value

The decoded value, if any.

See Also

Getting One Row