A type-safe, fluent SQLite query builder for React Native and Node.js (≥16), wrapping react-native-sqlite-storage. Current stable version: 1.0.3. Provides a clean builder API with features like select, join, aggregate functions (COUNT, SUM, AVG, MIN, MAX), advanced WHERE conditions (IN, BETWEEN, OR), duplicate query blocking, query caching, and SQL injection protection. Ships TypeScript types. Differentiators vs knex: focused on React Native, simpler API, built-in caching and deduplication. Release cadence: early stage, infrequent updates.
npm install sqlite-simplifierNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to initialize the library, perform a basic find, use the chainable query builder with a join and aggregation, and use advanced WHERE clauses.
Ensure you pass an instance of your Database class (e.g., from a wrapper) as first argument.
Use { id: 'id', title: 'transactions.title' } not ['id', 'title']. For simple select, use the chainable .select() instead.Do not import SimplifiedQueryBuilder. Use createAdvancedQuery and then call .query() to get the builder.
Pass array: where('id', 'IN', [1,2,3]) instead of where('id', 'IN', '1,2,3').Use import { createAdvancedQuery } from 'sqlite-simplifier' or ensure your environment supports ESM.Create a Database instance (e.g., from a wrapper) before passing it: const db = new Database(); const query = createAdvancedQuery(db, true);
Provide a table name string: await query.find('transactions') or query.query('transactions')...