Skip to content

feat: Complete Implementation of Sqlite Database and enhance documentation and tests#50

Merged
Yashh56 merged 7 commits intoRelwave:developfrom
Yashh56:db/sqlite
Mar 9, 2026
Merged

feat: Complete Implementation of Sqlite Database and enhance documentation and tests#50
Yashh56 merged 7 commits intoRelwave:developfrom
Yashh56:db/sqlite

Conversation

@Yashh56
Copy link
Copy Markdown
Member

@Yashh56 Yashh56 commented Mar 9, 2026

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-sqlite3 package and updates documentation to reflect the new capabilities. The most important changes are grouped below:

SQLite Database Support

  • Added full SQLite support to the tech stack and documentation, including connection via local file picker, schema explorer, ER diagrams, query builder, migrations, and CRUD operations. (FEATURES.md) [1] [2] [3] [4] [5] [6]
  • Updated handlers to support SQLite for database operations, migrations, queries, primary key listing, and table creation. (databaseHandlers.ts, migrationHandlers.ts, queryHandlers.ts) [1] [2] [3] [4] [5] [6]

Testing and Connection Builder

  • Added tests for SQLite connection building, including path and read-only mode handling. (connectionBuilder.test.ts) [1] [2]

Dependency Management

Documentation Updates

  • Updated feature documentation to include SQLite-specific features, engine colors, and new supported database section. (FEATURES.md) [1] [2]
  • Updated last updated date in documentation. (FEATURES.md)

@Yashh56 Yashh56 changed the base branch from master to develop March 9, 2026 04:14
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-sqlite3 plus 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.

Comment thread bridge/pnpm-lock.yaml
Comment thread bridge/src/services/connectionBuilder.ts Outdated
Comment thread src/lib/parseConnectionUrl.ts
Comment thread bridge/src/services/queryExecutor.ts
Comment thread bridge/src/services/queryExecutor.ts
Comment thread bridge/src/connectors/sqlite.ts Outdated
Comment thread bridge/pnpm-workspace.yaml
Comment thread bridge/src/types/sqlite.ts Outdated
Comment thread src/components/schema-explorer/SchemaExplorerPanel.tsx
Comment thread bridge/src/connectors/sqlite.ts Outdated
@Yashh56 Yashh56 merged commit 231185a into Relwave:develop Mar 9, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants