Skip to content

Instance Method

query(_:_:_:)

Execute a query on the connection, calling the provided closure for each result row (if any).
func query(_ query: String, _ binds: [SQLiteData], _ onRow: @escaping @Sendable (SQLiteRow) -> Void) async throws

Parameters

query

The query string to execute.

binds

An ordered list of SQLiteData items to use as bound parameters for the query.

onRow

A closure to invoke for each result row returned by the query, if any.

Discussion

This is the primary Concurrency-based interface to connections vended via this protocol. A default implementation is provided for protocol implementors who predate the existence of this requirement.

Default Implementations

SQLiteDatabase Implementations