sqlite-hub is a local-first, lightweight SQLite management app with a browser-based UI and backend, currently at v0.12.0. It provides a full-featured SQL editor with syntax highlighting, query history, performance metrics, and charting; a data browser with filtering, sorting, pagination, and in-place row editing with SQL diff preview; a schema inspector with relationship graphs; table designer with live SQL preview; and export to CSV/TSV/Markdown. Unlike heavy database clients (e.g., DBeaver, DataGrip) or cloud tools, it runs entirely locally, requires no server setup beyond the bundled SPA shell, and focuses on speed and minimalism for SQLite workflows. Releases are frequent (monthly) with incremental feature additions.
npm install sqlite-hubNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates an in-memory SQLite database, creates a table, inserts records, queries data, and closes the database. Demonstrates core CRUD with synchronous better-sqlite3 API.
Access columns by name: row.name instead of row[0]. Or destructure: const { name } = row;Use db.exec() and db.query() instead of raw instance methods. If you need the raw instance, use db.getRawDatabase().
Replace db.execRaw('...') with db.exec('...') wrapped in try/catch.For large queries, use: const stream = db.queryStream('SELECT * FROM big_table'); for (const row of stream) { ... }Use db.execMulti('STATEMENT1; STATEMENT2;') instead of db.exec().Always use parameterized queries: db.query('SELECT * FROM users WHERE id = ?', [userId])Upgrade to v0.11.0+ and use db.exec('...'). Or access the raw instance: const rawDb = require('better-sqlite3'); const db = rawDb('file.db');Ensure db.close() is called after all queries are done. Re-open the database if needed.
Provide valid SQL statement. Check for empty strings before calling query().
Upgrade to v0.10.0+ and access columns by name. Or upgrade and add migration code.