@@ -12,23 +12,23 @@ function createKyselyLogger(options: LoggerOptions): (event: LogEvent) => void
12
12
function savePoint(db : Kysely <any > | Transaction <any >, name ? : string ): Promise <SavePoint >
13
13
14
14
// run with savepoint, auto release or rollback
15
- function runWithSavePoint< DB extends Kysely <any > | Transaction <any >, O , >(
15
+ function runWithSavePoint<DB extends Kysely <any > | Transaction <any >, O >(
16
16
db : Kysely <any > | Transaction <any >,
17
17
fn : (db : DB ) => Promise <O >,
18
18
name ? : string
19
19
): Promise <O >
20
20
21
21
// check integrity (`integrity_check` pragma)
22
- function checkIntegrity(db : Kysely <any >): Promise <boolean >
22
+ function checkIntegrity(db : DatabaseConnection | Kysely < any > | Transaction <any >): Promise <boolean >
23
23
24
24
// get or set db version (`user_version` pragma)
25
- function getOrSetDBVersion(db : Kysely <any >, version ? : number ): Promise <number >
25
+ function getOrSetDBVersion(db : DatabaseConnection | Kysely < any > | Transaction <any >, version ? : number ): Promise <number >
26
26
27
27
// optimize pragma (typesafe `journal_mode`, `synchoronous`...)
28
- function optimzePragma(conn : DatabaseConnection , options ? : OptimizePragmaOptions ): Promise <void >
28
+ function optimzePragma(conn : DatabaseConnection | Kysely < any > | Transaction < any > , options ? : OptimizePragmaOptions ): Promise <void >
29
29
30
30
// control whether to enable foreign keys, **no param check**
31
- export async function foreignKeys(db : Kysely <any >, enable : boolean ): Promise <void >
31
+ export async function foreignKeys(db : DatabaseConnection | Kysely < any > | Transaction <any >, enable : boolean ): Promise <void >
32
32
33
33
// precompile querys for performance
34
34
function precompileQuery<O >(
0 commit comments