Instance Method
run(_:)
Run the query specified by the builder, calling the provided handler closure with each output row, if any, as it is received.
func run(_ handler: @escaping @Sendable (any SQLRow) -> ()) async throws
Parameters
handlerA closure which receives each output row one at a time.
See Also
Getting Rows
func run<D>(decoding: D.Type, (Result<D, any Error>) -> ()) async throwsUsing a default-configuredSQLRowDecoder, call the provided handler closure with the result of decoding each output row, if any, as a given type.func run<D>(decoding: D.Type, prefix: String?, keyDecodingStrategy: SQLRowDecoder.KeyDecodingStrategy, userInfo: [CodingUserInfoKey : any Sendable], (Result<D, any Error>) -> ()) async throwsConfigure a newSQLRowDecoderas 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.func run<D>(decoding: D.Type, with: SQLRowDecoder, (Result<D, any Error>) -> ()) async throwsUsing the givenSQLRowDecoder, call the provided handler closure with the result of decoding each output row, if any, as a given type.