feat: Complete Implementation of Sqlite Database and enhance documentation and tests#50
Merged
Yashh56 merged 7 commits intoRelwave:developfrom Mar 9, 2026
Merged
Conversation
…a explorer components
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds end-to-end SQLite support across the RelWave UI and bridge layer (connector, queries, handlers), along with tests and documentation updates to reflect the expanded database support.
Changes:
- Add SQLite database type support in the frontend (connection UX, schema explorer selection handling, engine colors).
- Implement a new SQLite bridge connector using
better-sqlite3plus SQLite-specific query helpers and handler wiring. - Add SQLite-focused tests and update docs/CI notes to cover the new capability.
Reviewed changes
Copilot reviewed 43 out of 44 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| src/types/database.ts | Adds sqlite to supported types and relaxes connection params for file-based configs. |
| src/services/bridgeApi.ts | Updates client-side required-field validation to allow SQLite connections. |
| src/pages/Index.tsx | Uses SQLite-specific required fields and adjusts payload defaults (port/sslmode). |
| src/lib/parseConnectionUrl.ts | Adds sqlite:// parsing + SQLite URL building support. |
| src/components/schema-explorer/TreeViewPanel.tsx | Changes selection key delimiter to ::: to avoid ambiguity/collisions. |
| src/components/schema-explorer/SchemaExplorerPanel.tsx | Updates selection parsing to match the new ::: delimiter. |
| src/components/schema-explorer/MetaDataPanel.tsx | Updates selection parsing to match the new ::: delimiter. |
| src/components/project/ProjectList.tsx | Adds an engine color mapping for SQLite. |
| src/components/project/ProjectDetailView.tsx | Adds an engine color mapping for SQLite. |
| src/components/project/ImportProjectDialog.tsx | Adds SQLite option + file picker UX and skips host/port/user/ssl where applicable. |
| src/components/home/types.ts | Adds SQLITE_REQUIRED_FIELDS constant. |
| src/components/home/WelcomeView.tsx | Generalizes DB type color handling and adds SQLite colors. |
| src/components/home/DiscoveredDatabasesCard.tsx | Adds SQLite color styling. |
| src/components/home/DatabaseDetail.tsx | Updates connection detail rendering for SQLite (file path vs host/port/user). |
| src/components/home/ConnectionList.tsx | Displays SQLite DB path instead of host for list items. |
| src/components/home/AddConnectionDialog.tsx | Adds SQLite option + file picker and disables URL tab for SQLite. |
| bridge/src/utils/migrationGenerator.ts | Allows sqlite as a migration generation DB type. |
| bridge/src/utils/dbTypeDetector.ts | Detects SQLite database type strings. |
| bridge/src/types/sqlite.ts | Introduces SQLite-specific config + metadata + DDL operation types. |
| bridge/src/types/index.ts | Exports SQLite types and adds DBType.SQLITE. |
| bridge/src/services/queryExecutor.ts | Wires SQLite connector into executor operations and schema aggregation. |
| bridge/src/services/databaseService.ts | Adjusts required-field validation for SQLite connections. |
| bridge/src/services/connectionBuilder.ts | Builds SQLite connection objects (path/readonly) in addition to server DB configs. |
| bridge/src/queries/sqlite/tables.ts | Adds SQLite PRAGMA constants for table metadata queries. |
| bridge/src/queries/sqlite/stats.ts | Adds SQLite stats query constants and PRAGMA keys. |
| bridge/src/queries/sqlite/schema.ts | Adds SQLite schema/table listing queries. |
| bridge/src/queries/sqlite/migrations.ts | Adds SQLite migration table and migration bookkeeping queries. |
| bridge/src/queries/sqlite/index.ts | Central export for SQLite query helpers. |
| bridge/src/queries/sqlite/crud.ts | Adds SQLite CRUD query builders and safe identifier quoting. |
| bridge/src/queries/sqlite/constraints.ts | Adds query for pulling CREATE TABLE SQL for check-constraint parsing. |
| bridge/src/queries/index.ts | Re-exports SQLite queries from the main query index. |
| bridge/src/handlers/statsHandlers.ts | Adds SQLite stats normalization to the handler response format. |
| bridge/src/handlers/queryHandlers.ts | Adds SQLite branches for table data, PK listing, DDL, and CRUD operations. |
| bridge/src/handlers/migrationHandlers.ts | Adds SQLite branches for apply/rollback migration operations. |
| bridge/src/handlers/databaseHandlers.ts | Adds SQLite type normalization for incoming connections. |
| bridge/src/connectors/sqlite.ts | Adds a full SQLite connector implementation (metadata, CRUD, migrations, caching). |
| bridge/pnpm-workspace.yaml | Adjusts pnpm build-script allow/deny lists for dependencies. |
| bridge/pnpm-lock.yaml | Adds better-sqlite3 and related dependency graph entries. |
| bridge/package.json | Adds better-sqlite3 + types as dependencies. |
| bridge/tests/connectors/sqlite.test.ts | Adds integration-style tests for SQLite connector behavior. |
| bridge/tests/connectors/sqlite.cache.test.ts | Adds unit tests for the SQLite cache manager behavior. |
| bridge/tests/connectionBuilder.test.ts | Adds tests for SQLite connection building behavior. |
| FEATURES.md | Documents SQLite support, feature matrix, and updates metadata. |
| .github/workflows/test.yml | Adds clarifying CI comments for SQLite tests and native module build expectations. |
Files not reviewed (1)
- bridge/pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
This pull request introduces full support for SQLite databases across the application, including connection management, schema discovery, CRUD operations, and migrations. It also adds the
better-sqlite3package and updates documentation to reflect the new capabilities. The most important changes are grouped below:SQLite Database Support
FEATURES.md) [1] [2] [3] [4] [5] [6]databaseHandlers.ts,migrationHandlers.ts,queryHandlers.ts) [1] [2] [3] [4] [5] [6]Testing and Connection Builder
connectionBuilder.test.ts) [1] [2]Dependency Management
better-sqlite3and its type definitions to dependencies and lock files. (package.json,pnpm-lock.yaml) [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15]Documentation Updates
FEATURES.md) [1] [2]FEATURES.md)