Skip to content

Commit c838e60

Browse files
committed
Add typing for new open options
1 parent 7b60a46 commit c838e60

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

types/sqlite.d.ts

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,41 @@ declare module "sqlite" {
2020
* @default true
2121
*/
2222
wal?: boolean | undefined;
23+
/**
24+
* Set the SQlite page size.
25+
* @default 4096
26+
*/
27+
pageSize?: number | undefined;
28+
/**
29+
* Enable foreign key constraints.
30+
*/
31+
foreignKeys?: boolean | undefined;
32+
/**
33+
* Maximum number of connections to the database.
34+
* @default 5
35+
*/
36+
maxConnections?: number | undefined;
37+
/**
38+
* Minimum number of connections to the database.
39+
* @default 0
40+
*/
41+
minConnections?: number | undefined;
42+
/**
43+
* Maximum amount of time (in seconds) that a connection is allowed to be idle before it is closed.
44+
* @default infinity
45+
*/
46+
idleTimeout?: number | undefined;
47+
/**
48+
* Maximum amount of time (in seconds) that a connection is allowed to exist before it is closed.
49+
* Set to `null` to disable.
50+
* @default 3600
51+
*/
52+
maxLifetime?: number | undefined;
53+
/**
54+
* Time (in milliseconds) to wait for the database to be unlocked before throwing an error.
55+
* @default 5000
56+
*/
57+
busyTimeout?: number | undefined;
2358
};
2459

2560
/**

0 commit comments

Comments
 (0)