From c838e608838734632783a565be87731d7fcff6bb Mon Sep 17 00:00:00 2001 From: Emile Fugulin Date: Tue, 10 Sep 2024 22:00:56 -0400 Subject: [PATCH] Add typing for new open options --- types/sqlite.d.ts | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/types/sqlite.d.ts b/types/sqlite.d.ts index e7a09e2..0035bc3 100644 --- a/types/sqlite.d.ts +++ b/types/sqlite.d.ts @@ -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; }; /**