NitroSQLite
React native nitro sqliteInterfaces

API Reference / react-native-nitro-sqlite / NitroSQLiteConnectionOptions

Interface: NitroSQLiteConnectionOptions

TypeScript

Source files: TypeScript

Options for open() and NitroSQLite.open().

Properties

connection?

optional connection?: "default" | "independent"

Defined in: types.ts:15

Choose a connection to the database file. The default connection is addressed by name, so opening it twice throws. Each independent connection has its own native handle and operation queue and can share a file with other connections. Defaults to 'default'.


location?

optional location?: string

Defined in: types.ts:8

Directory relative to the platform's database directory.


name

name: string

Defined in: types.ts:6

Database file name. Only one managed connection may use a name at a time.


readOnly?

optional readOnly?: boolean

Defined in: types.ts:21

Open an existing database without write access. Opening fails if the file does not exist. A read-only connection cannot write, attach, or delete a database. Defaults to false.