Skip to content

Commit

Permalink
Add typing for new open options
Browse files Browse the repository at this point in the history
  • Loading branch information
Sytten committed Sep 11, 2024
1 parent 7b60a46 commit c838e60
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions types/sqlite.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,41 @@ declare module "sqlite" {
* @default true
*/
wal?: boolean | undefined;
/**
* Set the SQlite page size.
* @default 4096
*/
pageSize?: number | undefined;
/**
* Enable foreign key constraints.
*/
foreignKeys?: boolean | undefined;
/**
* Maximum number of connections to the database.
* @default 5
*/
maxConnections?: number | undefined;
/**
* Minimum number of connections to the database.
* @default 0
*/
minConnections?: number | undefined;
/**
* Maximum amount of time (in seconds) that a connection is allowed to be idle before it is closed.
* @default infinity
*/
idleTimeout?: number | undefined;
/**
* Maximum amount of time (in seconds) that a connection is allowed to exist before it is closed.
* Set to `null` to disable.
* @default 3600
*/
maxLifetime?: number | undefined;
/**
* Time (in milliseconds) to wait for the database to be unlocked before throwing an error.
* @default 5000
*/
busyTimeout?: number | undefined;
};

/**
Expand Down

0 comments on commit c838e60

Please sign in to comment.