Skip to content

Instance Method

first(decoding:)

Using a default-configured SQLRowDecoder, returns the first output row, if any, decoded as a given type.
func first<D>(decoding type: D.Type) async throws -> D? where D : Decodable

Parameters

type

The type of the desired value.

Return Value

The decoded value, if any.

See Also

Getting One Row