Skip to content

feat: add ClickHouse database support#184

Open
datlechin wants to merge 7 commits intomainfrom
feat/clickhouse-support
Open

feat: add ClickHouse database support#184
datlechin wants to merge 7 commits intomainfrom
feat/clickhouse-support

Conversation

@datlechin
Copy link
Owner

Summary

Adds ClickHouse (columnar OLAP database) as a supported database engine in TablePro, closing #117.

  • Connection: HTTP API on port 8123 via URLSession (no C bridge needed)
  • Driver: Full DatabaseDriver protocol conformance using system.tables, system.columns, system.parts
  • 39 files changed across driver, models, services, coordinators, views, tests, and docs

What works

  • Connect, browse databases/tables, execute queries, view structure/DDL
  • Data editing (INSERT/UPDATE/DELETE via async mutations)
  • Export/import, filtering, autocomplete with ClickHouse dialect
  • Database switching, approximate row counts, table metadata (engine, size)
  • clickhouse:// and ch:// URL schemes

ClickHouse-specific behavior

  • No foreign keys, no schemas, no transactions (no-op)
  • Sorting key shown as primary index, data skipping indices listed
  • toString() cast for LIKE on non-string columns, match() for regex
  • Backslash string escaping (like MySQL), ? placeholders
  • System databases (system, information_schema) marked as system items

Test plan

  • Connect to a local ClickHouse instance on port 8123
  • Browse databases and tables in sidebar
  • Execute SELECT queries with pagination
  • View table structure (columns, indexes, DDL)
  • Edit data (insert/update/delete rows)
  • Filter with LIKE, regex, boolean conditions
  • Export table data (CSV, JSON, SQL)
  • Switch databases via database switcher
  • Verify ClickHouseColumnTypeTests pass
  • Verify ClickHouseDialectTests pass
  • Verify DatabaseTypeTests pass with new ClickHouse assertions

@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

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.

1 participant