typeORMDriver
TypeScriptSource files: TypeScript
const typeORMDriver: object
Adapter for TypeORM's React Native driver. Application code should use open().
openDatabase reports success or failure through callbacks and returns the
connection on success, or null when opening fails.
Type Declaration
openDatabase
openDatabase: (options, ok, fail) => TypeOrmNitroSQLiteConnection | null
Open a database for TypeORM.
Parameters
options
Database name, optional relative directory, and optional SEE key.
encryptionKey?
string
Key for a licensed SQLite SEE build. Without SEE, a supplied key fails
with EncryptionNotEnabled. An existing plaintext file is rejected.
location?
string
Directory relative to the platform database directory.
name
string
Database file name.
ok
(db) => void
Receives the adapter connection on success.
fail
(msg) => void
Receives the opening error on failure.
Returns
TypeOrmNitroSQLiteConnection | null