Skip to content

Database.(constructor)

Home > @direct-sqlite/core > Database > (constructor)

Constructs a new instance of the Database class

Signature:

constructor(client: GenericSqliteClient, options?: {
optimize?: "WAL" | "MEMORY" | "FAST";
cacheSize?: number;
} | undefined);

Parameter

Type

Description

client

GenericSqliteClient

An instance of a SQLite client (better-sqlite3, node:sqlite or ‘bun:sqlite`).

options

{ optimize?: “WAL” | “MEMORY” | “FAST”; cacheSize?: number; } | undefined

(Optional) Optional configuration for performance tuning and statement cache size.