-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbun-sqlite.d.ts
More file actions
33 lines (31 loc) · 833 Bytes
/
bun-sqlite.d.ts
File metadata and controls
33 lines (31 loc) · 833 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
declare module "bun:sqlite" {
export class Database {
constructor(
filename: string,
options?: { create?: boolean; readwrite?: boolean },
);
prepare(sql: string): Statement;
run(
sql: string,
...params: any[]
): { changes: number; lastInsertRowid: number | bigint };
query(sql: string, ...params: any[]): any[];
close(): void;
transaction(fn: (...args: any[]) => any): Transaction;
readonly totalChanges: number;
}
export class Statement {
all(...params: any[]): any[];
run(...params: any[]): {
changes: number;
lastInsertRowid: number | bigint;
};
finalize(): void;
}
export type Transaction = {
(...args: any[]): any;
run(...args: any[]): any;
immediate(...args: any[]): any;
exclusive(...args: any[]): any;
};
}