Skip to content

Instance Method

run(decoding:prefix:keyDecodingStrategy:userInfo:_:)

Configure a new SQLRowDecoder as 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.
@preconcurrency func run<D>(decoding type: D.Type, prefix: String? = nil, keyDecodingStrategy: SQLRowDecoder.KeyDecodingStrategy = .useDefaultKeys, userInfo: [CodingUserInfoKey : any Sendable] = [:], _ handler: @escaping @Sendable (Result<D, any Error>) -> ()) -> EventLoopFuture<Void> where D : Decodable, D : SendableMetatype

Parameters

type

The type of the desired values.

prefix

See prefix.

keyDecodingStrategy

See keyDecodingStrategy.

userInfo

See userInfo.

handler

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

Return Value

A completion future.

See Also

Legacy `EventLoopFuture` Interfaces