MCPcopy
hub / github.com/kysely-org/kysely / Driver

Interface Driver

src/driver/driver.ts:10–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8 * and is also responsible for connection pooling (if the dialect supports pooling).
9 */
10export interface Driver {
11 /**
12 * Initializes the driver.
13 *
14 * After calling this method the driver should be usable and `acquireConnection` etc.
15 * methods should be callable.
16 */
17 init(options?: AbortableOperationOptions): Promise<void>
18
19 /**
20 * Acquires a new connection from the pool.
21 */
22 acquireConnection(
23 options?: AbortableOperationOptions,
24 ): Promise<DatabaseConnection>
25
26 /**
27 * Begins a transaction.
28 */
29 beginTransaction(
30 connection: DatabaseConnection,
31 settings: TransactionSettings,
32 ): Promise<void>
33
34 /**
35 * Commits a transaction.
36 */
37 commitTransaction(connection: DatabaseConnection): Promise<void>
38
39 /**
40 * Rolls back a transaction.
41 */
42 rollbackTransaction(connection: DatabaseConnection): Promise<void>
43
44 /**
45 * Establishses a new savepoint within a transaction.
46 */
47 savepoint?(
48 connection: DatabaseConnection,
49 savepointName: string,
50 compileQuery: QueryCompiler['compileQuery'],
51 ): Promise<void>
52
53 /**
54 * Rolls back to a savepoint within a transaction.
55 */
56 rollbackToSavepoint?(
57 connection: DatabaseConnection,
58 savepointName: string,
59 compileQuery: QueryCompiler['compileQuery'],
60 ): Promise<void>
61
62 /**
63 * Releases a savepoint within a transaction.
64 */
65 releaseSavepoint?(
66 connection: DatabaseConnection,
67 savepointName: string,

Callers 35

initMethod · 0.65
acquireConnectionMethod · 0.65
provideConnectionMethod · 0.65
executeMethod · 0.65
executeMethod · 0.65
beginTransactionMethod · 0.65
executeMethod · 0.65
commitMethod · 0.65
commitTransactionMethod · 0.65
executeMethod · 0.65
rollbackMethod · 0.65
rollbackTransactionMethod · 0.65

Implementers 7

RuntimeDriversrc/driver/runtime-driver.ts
DummyDriversrc/driver/dummy-driver.ts
PostgresDriversrc/dialect/postgres/postgres-driver.t
MysqlDriversrc/dialect/mysql/mysql-driver.ts
PGliteDriversrc/dialect/pglite/pglite-driver.ts
SqliteDriversrc/dialect/sqlite/sqlite-driver.ts
MssqlDriversrc/dialect/mssql/mssql-driver.ts

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…