Skip to content

Instance Method

run(decoding:_:)

Using a default-configured SQLRowDecoder, call the provided handler closure with the result of decoding each output row, if any, as a given type.
func run<D>(decoding type: D.Type, _ handler: @escaping @Sendable (Result<D, any Error>) -> ()) async throws where D : Decodable, D : SendableMetatype

Parameters

type

The type of the desired values.

handler

A closure which receives the result of each decoding operation, row by row.

See Also

Getting Rows