Conversation
There was a problem hiding this comment.
Pull request overview
Adds first-class support for chDB as a SQL database option across the app (connection config + UI + Tauri backend), largely treating it as a ClickHouse-compatible engine.
Changes:
- Introduces a new
SqlDatabaseType.ChDbandChDbConfig, wiring it through connection creation, URL parsing, icons, SQL editor highlighting, escaping, schema tooling, and backups. - Adds a new Rust
chdbcrate (dylib-backed) and integrates it into thedatabasecrate as a newDatabase::ChDbvariant. - Adds a dedicated connection options editor UI for chDB.
Reviewed changes
Copilot reviewed 20 out of 21 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src-web/ui/database-icon.tsx | Shows ClickHouse icon for chDB connections. |
| src-web/tauri/database/config.ts | Adds SqlDatabaseType.ChDb, ChDbConfig, and includes chDB in ALL_DATABASE_TYPE. |
| src-web/pages/database/sql-editor/language/index.ts | Maps chDB to an existing Monarch token provider selection. |
| src-web/pages/database/hooks/use-store.ts | Treats chDB as a SQL database type (not KV). |
| src-web/pages/database/hooks/use-db.ts | Assigns default schema behavior for chDB. |
| src-web/pages/database/db/escape.ts | Adds chDB to identifier/escape behavior groupings. |
| src-web/pages/database/db/db.ts | Adds chDB handling across many SQL capability/query switch branches (mostly ClickHouse-aligned). |
| src-web/pages/database/ai/services.ts | Adds an AI display name mapping for chDB. |
| src-web/pages/connections/utils.ts | Adds default config + URL encode/decode support for chdb:// connections. |
| src-web/pages/connections/options-editor/chdb.tsx | New UI editor tab for chDB connection options. |
| src-web/pages/connections/connections.tsx | Registers chDB editor component in the connection editor router. |
| src-web/pages/backup/utils.tsx | Enables backup config generation for chDB connections. |
| src-tauri/sql.rs | Maps SqlDatabaseType::ChDb to ClickHouse SQL dialect handling. |
| src-crates/database/src/lib.rs | Adds Database::ChDb and wires connect/test/select/execute/transaction/query/batch_insert dispatch. |
| src-crates/database/src/chdb.rs | New database adapter implementing chDB operations via chdb::Connection. |
| src-crates/database/Cargo.toml | Adds chdb dependency to the database crate. |
| src-crates/connection-config/connection_config.rs | Adds ConnectionConfig::ChDb, SqlDatabaseType::ChDb, and ChDbConfig serialization support. |
| src-crates/chdb/src/lib.rs | New dylib-backed chDB driver wrapper (connect/execute/query/select) + unit test. |
| src-crates/chdb/src/ffi.rs | Defines FFI types and symbol signatures for the chDB driver. |
| src-crates/chdb/examples/chdb.rs | Adds a small runnable example demonstrating basic chDB usage. |
| Cargo.lock | Adds the new chdb crate to the lockfile. |
💡 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.
No description provided.