Configuration
Shared SQLite settings in package.json.
Add the options you want to change to your app's package.json. These are the defaults for bundled SQLite on iOS, Android, macOS, and visionOS:
{
"nitroSQLite": {
"threadSafe": true,
"performanceMode": true,
"enableRTree": true
}
}All values are booleans. Rebuild your app after changes; on Apple platforms, install Pods again first.
Thread safety
Keep threadSafe enabled. Disabling it rejects independent connections and requires serializing all SQLite calls across the process, including calls to different databases.
Performance mode
performanceMode enables SQLite build optimizations independently of threadSafe and enableRTree. See behavior and tradeoffs.
RTree support
enableRTree includes spatial and interval indexes. Disabling it can cause no such module: rtree for schemas using them. See query examples.
When supplying custom flags, omit SQLITE_ENABLE_RTREE to disable it. Defining it as 0 still enables the module.
For platform settings and alternative build flags, see iOS, Android, or macOS.