SQLite3 Driver Config

Hierarchy

  • SQLite3DriverConfig

Properties

explicitWrite: boolean

Open explicitly for writing.

By default, the driver will always open the DB as readonly, and attempt to open another link to perform write operations. If you know that only one instance will be writing, you can force the driver to open for writing by default, which will block any other instance from opening it for writing.

One thing to note is that starting a transaction is a write operation, so as long as an instance is in a transaction, no other instances can write.

PubSub also needs to open the DB, and it only needs read access.

fileMustExist: boolean

If the file does not exist, an Error will be thrown instead of creating a new file.

This option is ignored for in-memory, temporary, or readonly database connections.

filename: string

The filename of the SQLite3 DB. Use ':memory:' for an in-memory DB.

prefix: string

The SQLite3 table name prefix.

timeout: number

The timeout to use for waiting for the DB to become available.

verbose: undefined | ((message?, ...additionalArgs) => void)

Function that gets called with every SQL string executed.

wal: boolean

Turn on WAL mode.

This will generally increase performance, but does mean that the DB must be on a local disk.

See: https://www.sqlite.org/wal.html

Generated using TypeDoc