Registry / database / react-native-quick-sqlite

react-native-quick-sqlite

JSON →
library8.2.7jsnpmunverified

A fast SQLite library for React Native, currently at v8.2.7 (latest stable for the react-native-quick-sqlite package). This package is deprecated and replaced by react-native-nitro-sqlite (v9+). It provides high-performance synchronous and asynchronous SQLite operations with a C++ native implementation. Known for its speed compared to other React Native SQLite libraries. Release cadence has slowed as focus shifts to the successor.

npm install react-native-quick-sqlite
INSTALL
IMPORT
SIG · REACT-NATIVE-QUICK
R
react-native-quick-sqlite
databasejavascriptv8.2.7
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

open
import { open } from 'react-native-quick-sqlite'
const { open } = require('react-native-quick-sqlite')
ESM import preferred; CommonJS require works but may not infer types.
SqliteDatabase
import type { SqliteDatabase } from 'react-native-quick-sqlite'
import { SqliteDatabase } from 'react-native-quick-sqlite'
SqliteDatabase is a type, must use 'import type' for TypeScript.
useSQLiteContext
import { useSQLiteContext } from 'react-native-quick-sqlite'
import useSQLiteContext from 'react-native-quick-sqlite'
Named export, not default.

Opens a SQLite database, creates a table, inserts a row, and queries all rows using async API.

import { open } from 'react-native-quick-sqlite'; async function initDatabase() { const db = await open({ name: 'myapp.db', location: 'default' }); await db.execute('CREATE TABLE IF NOT EXISTS users (id INTEGER PRIMARY KEY, name TEXT)'); const result = await db.execute('INSERT INTO users (name) VALUES (?)', ['Alice']); console.log('Inserted ID:', result.insertId); const rows = await db.execute('SELECT * FROM users'); console.log('Rows:', rows.rows); await db.close(); } initDatabase().catch(console.error);
Debug
Known issues
deprecatedreact-native-quick-sqlite is deprecated. Use react-native-nitro-sqlite instead.
fix
Migrate to react-native-nitro-sqlite by following the migration guide at https://github.com/margelo/react-native-nitro-sqlite
affects: >=8.0.0
breakingFrom v9, this package is no longer published under 'react-native-quick-sqlite' but as 'react-native-nitro-sqlite'. Imports change.
fix
Change imports to 'react-native-nitro-sqlite' and update package.json dependency.
affects: >=9.0.0
breakingIn v8, the default export was removed; only named exports are available.
fix
Use named imports like import { open } from 'react-native-quick-sqlite' instead of import QuickSQLite from '...'.
affects: >=8.0.0
gotchaThe database file location must be specified explicitly; default is not guaranteed to work on all platforms.
fix
Always provide a location option (e.g., 'default' or a full path).
affects: *
Errors
Common errors & fixes
Cannot find module 'react-native-quick-sqlite'
Package not installed correctly or react-native linking issue.
fix
Run 'npm install react-native-quick-sqlite' and ensure native modules are linked (pod install for iOS).
Null is not an object (evaluating 'db.execute')
Database not opened successfully; likely missing location or invalid name.
fix
Check that open() resolves with a valid database object; log db to debug.
TypeError: (0 , _reactNativeQuickSqlite.open) is not a function
Improper import (likely using default import instead of named).
fix
Use import { open } from 'react-native-quick-sqlite'.
Upgrade
Version history
8.2.7latest on npm
Audit
Dependencies
reactrequiredpeer dependency for React Native
react-nativerequiredpeer dependency required for native modules
Agent activity
11 hits · last 30 days
node
8
Meta
1
Resources
react-native-quick-sqlite — npm install react-native-quick-sqlite · libregistry