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
queryThe query string to execute.
bindsAn ordered list of
SQLiteDataitems to use as bound parameters for the query.onRowA 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
func query(String, [SQLiteData], (SQLiteRow) -> Void) -> EventLoopFuture<Void>Convenience method for callingquery(_:_:logger:_:)with the connection’s logger.func query(String, [SQLiteData], (SQLiteRow) -> Void) async throwsConvenience method for callingquery(_:_:logger:_:)with the connection’s logger (async version).