Skip to content

Conversation

@kyleconroy
Copy link
Collaborator

Add ClickHouse support using the github.com/sqlc-dev/doubleclick parser library.

New files in internal/engine/clickhouse/:

  • parse.go: Parser implementation using doubleclick
  • convert.go: AST converter from doubleclick to sqlc AST
  • format.go: ClickHouse-specific SQL formatting
  • catalog.go: Catalog initialization
  • stdlib.go: Standard library functions
  • reserved.go: Reserved keywords
  • utils.go: Helper functions
  • parse_test.go: Unit tests

Supported SQL operations:

  • SELECT with JOINs, subqueries, CTEs, window functions
  • INSERT with VALUES and SELECT subquery
  • UPDATE and DELETE
  • CREATE TABLE, ALTER TABLE, DROP TABLE, TRUNCATE

kyleconroy and others added 4 commits January 16, 2026 20:39
Add ClickHouse support using the github.com/sqlc-dev/doubleclick parser library.

New files in internal/engine/clickhouse/:
- parse.go: Parser implementation using doubleclick
- convert.go: AST converter from doubleclick to sqlc AST
- format.go: ClickHouse-specific SQL formatting
- catalog.go: Catalog initialization
- stdlib.go: Standard library functions
- reserved.go: Reserved keywords
- utils.go: Helper functions
- parse_test.go: Unit tests

Supported SQL operations:
- SELECT with JOINs, subqueries, CTEs, window functions
- INSERT with VALUES and SELECT subquery
- UPDATE and DELETE
- CREATE TABLE, ALTER TABLE, DROP TABLE, TRUNCATE

Co-Authored-By: Claude <[email protected]>
Remove ClickHouse from compiler/engine.go and config.go.
Add --dialect clickhouse support to the sqlc parse command.

Co-Authored-By: Claude <[email protected]>
@kyleconroy kyleconroy changed the title feat: add ClickHouse database engine support feat: add ClickHouse support to sqlc parse Jan 17, 2026
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