NitroSQLite
react-native-nitro-sqliteInterfaces

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'.


encryptionKey?

optional encryptionKey?: string

Defined in: types.ts:29

Key for a database built with the licensed SQLite Encryption Extension (SEE). Supply the same nonempty key on every connection to an encrypted file. Passing a key to an existing plaintext database throws; it does not encrypt or migrate that file. A build without SEE rejects any supplied key.

See

Encryption guide


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.

On this page