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.
Closes a transaction-bound driver's handle (rolls back anything uncommitted). No-op otherwise.
Opens a write transaction on its own connection and returns a driver bound to it. BEGIN, every statement, and COMMIT/ROLLBACK then run on that one connection. The caller must release() it (idempotent); commit() and rollback() also settle the handle.
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.