Skip to content

Instance Method

first(decodingColumn:as:)

Returns the named column from the first output row, if any, decoded as a given type.
func first<D>(decodingColumn column: String, as type: D.Type) async throws -> D? where D : Decodable

Parameters

column

The name of the column to decode.

type

The type of the desired value.

Return Value

The decoded value, if any.

See Also

Getting One Row