Skip to content

egon-orm-workspace / @egon-orm/sqlite / SqliteOptions

Interface: SqliteOptions ​

Defined in: sqlite/src/options.ts:31

The options of sqlite. Every option may also be given as undefined, which is the same as leaving it out.

Example ​

ts
const options: SqliteOptions = {
  filename: "app.db",
  pragmas: { journal_mode: "WAL", busy_timeout: 5000 },
};

Properties ​

attach? ​

ts
readonly attach?: Readonly<Record<string, string>>;

Defined in: sqlite/src/options.ts:45

Databases attached to the handle when it is opened, by schema name: { audit: "audit.db" } runs attach database 'audit.db' as audit. A query's schema option names one of them.


filename ​

ts
readonly filename: string;

Defined in: sqlite/src/options.ts:33

The database file, or ":memory:" for a database that lives as long as the adapter.


planCacheSize? ​

ts
readonly planCacheSize?: number;

Defined in: sqlite/src/options.ts:47

How many compiled query shapes the adapter keeps. Default 1,000.


pragmas? ​

ts
readonly pragmas?: Readonly<Record<string, PragmaValue>>;

Defined in: sqlite/src/options.ts:38

Pragmas run, in order, when the database is opened (pragma journal_mode = WAL). foreign_keys is ON unless it is given here.


readonly? ​

ts
readonly readonly?: boolean;

Defined in: sqlite/src/options.ts:40

Opens the file read-only. Default false.