Skip to content

Support chDB#189

Merged
wyhaya merged 1 commit into
mainfrom
chdb
Jun 3, 2026
Merged

Support chDB#189
wyhaya merged 1 commit into
mainfrom
chdb

Conversation

@wyhaya
Copy link
Copy Markdown
Member

@wyhaya wyhaya commented Jun 3, 2026

No description provided.

Copy link
Copy Markdown

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

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.ChDb and ChDbConfig, wiring it through connection creation, URL parsing, icons, SQL editor highlighting, escaping, schema tooling, and backups.
  • Adds a new Rust chdb crate (dylib-backed) and integrates it into the database crate as a new Database::ChDb variant.
  • 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.

Comment thread src-crates/database/src/chdb.rs
Comment thread src-crates/chdb/src/lib.rs
@wyhaya wyhaya merged commit 9d6538f into main Jun 3, 2026
1 check passed
@wyhaya wyhaya deleted the chdb branch June 3, 2026 13:44
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