Connection
import { Connection } from "https://raw.githubusercontent.com/jeremyBanks/database/0.1.0-dev/sql/sql.ts";
class Connection<Meta extends driver.MetaBase> { }
private contextCloser: () => void;
async close(): Promise<void>;
async closed(): Promise<void>;
§Type Parameters
§
Meta extends driver.MetaBase
[src]§Properties
§Methods
§
prepareStatement(sqlString: string): Promise<PreparedStatement<Meta>>
[src]Prepares a SQL query for execution in this connection without a transaction.
May throw DatabaseConnectivityError
or DatabaseEngineError
.
§
startTransaction(): Promise<Transaction<Meta>>
[src]Starts a new transaction in the connection. If if there is an already an active transaction in progress on this connection, this will block until it is closed.
May throw DatabaseConnectivityError
or DatabaseEngineError
.