Skip to content

chore(deps): Upgrade NitroSQLite from 9.8.3 to 10.2.0 #102424

Open

Description

@MelvinBot

Summary

Upgrade react-native-nitro-sqlite from 9.8.3 to the latest release, 10.2.0.

This builds on chore(deps): Update NitroSQLite from 9.6.0 to 9.8.0, whose PR, chore(deps): Update NitroSQLite to 9.8.2, 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
    • Grouped batch parameters reuse a prepared statement, and query results skip an extra native row copy. #387
    • Each connection caches its 32 most recently used statements, async work runs on a dedicated worker thread per connection, and Android writes use fdatasync() and batch atomic writes where supported. #440
  • Node.js mock. react-native-nitro-sqlite/mock runs against better-sqlite3 for tests that need a real SQLite engine. #395

See the full comparison for every change.

Scope

  • Bump react-native-nitro-sqlite to 10.2.0 in App, and in the HybridApp lockfile via Mobile-Expensify#14179.
  • Update the optional NitroSQLite peer dependency range in react-native-onyx to ^10.2.0 via feat(storage): use NitroSQLite 10.2 connections and statements. 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.
    • A SQL string with more than one statement now throws instead of running only the first statement. #439
    • Query results are plain objects, not Nitro HybridObjects, so they no longer have dispose(), equals(), toString(), or name. #440

Activity

  1. chrispader commented on Oct 12, 2026

    @chrispader
    Contributor

    @MelvinBot could you assign an Expensify engineer and C+ on this issue and the related PRs?

  2. chrispader commented on Oct 12, 2026

    @chrispader
    Contributor

    @MelvinBot also update the issue to v10.2.0

  3. MelvinBot commented on Oct 12, 2026

    @MelvinBot
    ContributorAuthor

    I picked the engineer and C+ who handled the 9.8.x update. NicolasBonet was the engineer on chore(deps): Update NitroSQLite from 9.6.0 to 9.8.0, and ikevin127 reviewed its PR as C+.


    view run

  4. changed the title [-]chore(deps): Upgrade NitroSQLite from 9.8.2 to 10.0.0[/-] [+]chore(deps): Upgrade NitroSQLite from 9.8.3 to 10.2.0[/+] on Oct 12, 2026
  5. MelvinBot commented on Oct 12, 2026

    @MelvinBot
    ContributorAuthor

    I updated the issue to target NitroSQLite v10.2.0.

    • Title: The title now reads "Upgrade NitroSQLite from 9.8.3 to 10.2.0". App main already uses 9.8.3, so the starting version changed too.
    • Why update: I added the 10.1 and 10.2 performance work and the Node.js mock.
    • Scope: I linked the Onyx PR and the new Mobile-Expensify lockfile PR, Mobile-Expensify#14179.
    • Upgrade notes: I added the two 10.2 breaking changes. A SQL string with more than one statement now throws. Query results are now plain objects, not Nitro HybridObjects.

    view run

  6. NicolasBonet commented on Oct 19, 2026

    @NicolasBonet
    Contributor

    @chrispader could you please let me know how much is pending to complete this?

  7. chrispader commented on Oct 19, 2026

    @chrispader
    Contributor

    @chrispader could you please let me know how much is pending to complete this?

    I have still to address the latest review comments by @ikevin127 and @fabioh8010 and finalize my benchmark results for this Onyx change in Expensify/react-native-onyx#851 (review)

    After the Onyx PR is merged, i'll ping you on the E/App PR 🙌🏼

  8. NicolasBonet commented on Oct 26, 2026

    @NicolasBonet
    Contributor

    @chrispader same question for this week 😅

  9. chrispader commented on Oct 26, 2026

    @chrispader
    Contributor

    @NicolasBonet all issues are addressed and benchmarks were positive! We have to wait for prior Onyx bump PRs #102135 & #103208 to be merged, after that i'm going to resolve conflicts, do a last check and then we're good to go!

  10. NicolasBonet commented on Oct 26, 2026

    @NicolasBonet
    Contributor

    Thank you @chrispader 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions