Summary
Upgrade react-native-nitro-sqlite from 9.8.2 to the latest release, 10.0.0.
This is on hold until chore(deps): Update NitroSQLite from 9.6.0 to 9.8.0 is done and its PR, [HOLD on Mobile-Expensify#14129] [Task 2/2] chore(deps): Update NitroSQLite to 9.8.0, is merged.
Why update
- Prepared statements.
db.prepare(query) prepares SQL once and runs it many times with new parameters. #294
- Independent DB connections.
open({ name, connection: 'independent' }) opens a separate native connection with its own queue, so a reader can run while a writer holds a transaction. #364
- Performance improvements. Async queries, batches, and file imports enter a per-connection native queue without waiting for the previous result to return through JavaScript. #369
See the full comparison for every change.
Scope
- Bump
react-native-nitro-sqlite to 10.0.0 in App, and in the HybridApp lockfile via Mobile-Expensify#14129.
- Update the optional NitroSQLite peer dependency range in react-native-onyx. Onyx currently allows only
9.x, so installing NitroSQLite 10 fails dependency resolution.
- Rebuild the native apps. Upstream notes these upgrade changes:
- Existing single-connection calls keep working. Independent connections are opt-in and require
SQLITE_THREADSAFE to be non-zero.
- Deleting a database now fails while another connection still uses the file.
- Prepared statements must be finalized before their connection closes.
Summary
Upgrade
react-native-nitro-sqlitefrom9.8.2to the latest release,10.0.0.This is on hold until chore(deps): Update NitroSQLite from 9.6.0 to 9.8.0 is done and its PR, [HOLD on Mobile-Expensify#14129] [Task 2/2] chore(deps): Update NitroSQLite to 9.8.0, is merged.
Why update
db.prepare(query)prepares SQL once and runs it many times with new parameters. #294open({ name, connection: 'independent' })opens a separate native connection with its own queue, so a reader can run while a writer holds a transaction. #364See the full comparison for every change.
Scope
react-native-nitro-sqliteto10.0.0in App, and in the HybridApp lockfile via Mobile-Expensify#14129.9.x, so installing NitroSQLite 10 fails dependency resolution.SQLITE_THREADSAFEto be non-zero.