NitroSQLite
TypeScriptSource files: TypeScript
const NitroSQLite: object
Node test entry point. NitroSQLite.open is the same factory as open.
Type Declaration
open
open: (options) => MockConnection
Open a SQLite database in a temporary directory for Node tests.
Connections with the same name and location share a file. Opening a second
default connection with the same name throws; independent connections have
separate handles and queues. Read-only opens require an existing database.
Closing preserves data until deletion or resetAllDatabases.
Parameters
options
Name, relative location, connection mode, and read-only setting.
Returns
A connection supporting queries, batches, prepared statements, and transactions.
Throws
If the name or location escapes the temporary directory, the database cannot be opened, or a default connection already uses the name.