Repository navigation
feat: add SQLite connector - #56
Merged
Merged
Conversation
Add @omni-sql/adapters-sqlite on built-in node:sqlite: file/:memory: endpoints (no file creation on typos), ATTACH-aware schemas, tables, views, keys, indexes, functions, bounded/streamed queries, read-only second connection, EXPLAIN QUERY PLAN, validation and row editing. Wire the dialect through ts-types, descriptors, backend handlers, MCP, diagnostics and the desktop UI (connection dialog with file picker and read-only option, table DDL, formatter, icon, commands, i18n). Surface sanitized SQLite errors instead of "Internal error". Update docs and coverage lists. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a SQLite connector built on Node 22's built-in
node:sqlite, so no new native dependency is needed.@omni-sql/adapters-sqlite:memory:. A missing file fails instead of being created silently.mainplusATTACHed databases.REFERENCES twith no column), UNIQUE, defaults, indexes and built-in functions.0x…hex.EXPLAIN QUERY PLANis shown as a tree, and validation is prepare-only.updateRow/insertRow.:memory:they usequery_onlyand reject PRAGMA, ATTACH and DETACH.ts-typesanddialect-descriptors.connection.test.scripts/test-coverage.mjsand Sonar.SQLite: …message (safeSqliteDatabaseError).ALTERs produce a "rebuild table" comment instead.Also adds a missing
/* global */header toscripts/test-coverage.mjs. Without it the precommit lint fails as soon as the file is staged.Known limitations
node:sqliteis synchronous. A long query blocks the backend until it finishes and cannot be cancelled.ALTER TABLEcannot change a column's type, NULL or default, or the PK. The table editor emits guidance comments instead.Test plan
adapters-sqlite: 8 tests against real files, all passing. They cover endpoint validation, ATTACH introspection, limits, bigint and BLOB values, read-only mode, explain and validate, indexes and definitions, edits with odd identifiers, and streaming with abort.test:fast) passes.🤖 Generated with Claude Code