Optionalreserved: ReservedSql<{}>Begins a new database transaction.
Commits the current database transaction.
Establishes a connection to the database.
Closes the connection to the database.
Prepares an SQL query for execution.
The SQL query string to prepare.
A promise resolving to the prepared statement.
Executes a one-off SQL query.
The expected type of the rows in the result.
The SQL query string.
Optionalparams: QueryParams
Optional parameters for the query.
A promise resolving to the database result.
Returns a reserved connection to the pool. Idempotent; no-op on a pool driver.
Reserves one pooled connection and returns a driver bound to it. BEGIN, every statement in the transaction, and COMMIT/ROLLBACK all run on that single connection; the pool would otherwise spread them across connections. The connection is returned to the pool on commit, rollback or release().
Rolls back the current database transaction.
Streams the results of an SQL query row by row.
The expected type of each row.
The SQL query string.
Parameters for the query.
Callback function called for each row.
A promise that resolves when the stream finishes.
Core interface for database drivers. All dialect-specific drivers (Postgres, SQLite, etc.) must implement this. This ensures a consistent API for database operations across different storage engines.