Melon-dbMelon-db
Packages

@melon-db/db-sqlite-native

Melon-db SQLite native module for React Native development builds (sync C++ JSI on iOS and Android).

Status: Shipped (sync JSI + TurboModule fallback) · Expo Go: Not supported

Native SQLite module used by @melon-db/db-sqlite/rn. For Expo Go, use @melon-db/db-sqlite/expo instead.

Install (alpha)

npm install @melon-db/db-sqlite-native@alpha

Or with Bun:

bun add @melon-db/db-sqlite-native@alpha

Platform support

PlatformBindingStatus
iOS (dev build)Sync C++ JSI (global.melonSqliteJsi)Supported
iOS (dev build)TurboModule fallback (mode: 'turbo')Supported
Android (dev build)Sync C++ JSI (global.melonSqliteJsi)Supported
Android (dev build)TurboModule fallback (mode: 'turbo')Supported
Expo GoN/ANot available

Limitations

  • BLOB / bytes fields are not round-tripped (returned as null).
  • Reactive invalidation is handled by @melon-db/db-sqlite observeQuery (predicate-aware; same on native and Expo paths).

Setup

  • Expo Go: apps/playground-rn — bun run dev:rn
  • Development build (iOS): bun run dev:rn:dev then bun run dev:rn:dev:start — expect native jsi-sync (ios) badge
  • Development build (Android): bun run dev:rn:dev:android then start Metro — expect native jsi-sync (android) badge

Pass basePath (e.g. expo-file-system documentDirectory) when using a relative filename.

createJsiSqliteAdapter({ mode: 'auto' }) prefers sync JSI on iOS and Android when the host object is installed. Set EXPO_PUBLIC_MELON_SQLITE=turbo to force the async TurboModule path for comparison.

After changing native spec or C++ sources, run expo prebuild --clean in apps/playground-rn-dev. See the package README.

Author & license

Copyright (c) 2026 Nate Nichols. MIT License.