Feature Matrix

Native PostgreSQL and ClickHouse support for compilation, SQL import, and editor tooling.

This matrix is derived from the current native PostgreSQL and ClickHouse implementations. Status values are intentionally simple:

  • Supported: the checked native subset is available.
  • Partial or gated: the surface or its proof is intentionally bounded.
  • Unsupported: the native implementation does not provide it.
  • Not applicable: the feature does not make sense for that direction.

Dialect boundary

Read the matrix as a planning guide, not a promise that every vendor-specific SQL feature is abstracted. BtrQL favors explicit dialect errors over generating SQL that only looks portable.

PostgreSQL

Native compiler for PostgreSQL 16–18. Project compilation and incremental LSP are implemented; reverse is a bounded full-profile subset, while full debugger execution and post-compile hooks remain gaps.

Supported: Supported Supported Partial or gated: Partial or gated Partial or gated Unsupported: Unsupported Unsupported Not applicable: Not applicable Not applicable
BtrQL to SQL BtrQL to SQL: Supported
SQL import SQL import: Partial or gated
Editor Editor: Partial or gated

Compiler and project

Feature BtrQL syntax Examples Support
Native parse, check, lower, render

Tree-sitter source mapping, typed model, semantic checks, and native dialect rendering.

users.where(active == TRUE).select(id)
BtrQL to SQL SQL import Editor
BtrQL to SQL: Supported SQL import: Partial or gated Editor: Supported
Mixed projects and incremental builds

Compiles.btrql and.sql modules with dependency invalidation, source overrides, and relative outputs.

import reporting.sharedusers.select(id)
BtrQL to SQL SQL import Editor
BtrQL to SQL: Supported SQL import: Not applicable Editor: Supported
Values, modules, extensions, and declared shapes

Reusable compile-time source and typed project symbols.

val cutoff = 10extension onlyActive(source) = source.where(active == TRUE)
BtrQL to SQL SQL import Editor
BtrQL to SQL: Supported SQL import: Not applicable Editor: Supported

Query and dialect surface

Feature BtrQL syntax Examples Support
Joins, CTEs, grouping, windows, and set operations

The shared promoted query-composition subset.

with { recent = users.where(active) } recent.groupBy(team_id).select(team_id, count())
BtrQL to SQL SQL import Editor
BtrQL to SQL: Supported SQL import: Partial or gated Editor: Supported
PostgreSQL versioned forms

DISTINCT ON, ROWS FROM WITH ORDINALITY, JSON_TABLE, RETURNING WITH, and temporal-key forms in their checked versions.

users.distinctOn(team_id)rowsFromWithOrdinality(...)
BtrQL to SQL SQL import Editor
BtrQL to SQL: Supported SQL import: Partial or gated Editor: Supported
DML, schema objects, and routines

PostgreSQL has the broader promoted authoring surface; ClickHouse is intentionally narrower.

users.where(id == 1).update(name -> 'Ada').returning(id)
BtrQL to SQL SQL import Editor
BtrQL to SQL: Supported SQL import: Partial or gated Editor: Supported

Tooling and known gaps

Feature BtrQL syntax Examples Support
Incremental LSP and navigation

Ranged document sync is implemented; navigation is strongest in the active document and is not rename-complete across the workspace.

textDocumentSync.change = 2
BtrQL to SQL SQL import Editor
BtrQL to SQL: Not applicable SQL import: Not applicable Editor: Partial or gated
Trace and debugger runtime

Full-profile custom LSP/MCP endpoints exist, but the native CLI has no trace/debug commands and no general transaction/savepoint runtime.

native CLI trace/debug: unavailable
BtrQL to SQL SQL import Editor
BtrQL to SQL: Not applicable SQL import: Not applicable Editor: Partial or gated
Post-compile project hooks

Missing in the native implementation. PostgreSQL is planned first; ClickHouse is outside the initial scope.

post-compile-hooks.json
BtrQL to SQL SQL import Editor
BtrQL to SQL: Unsupported SQL import: Not applicable Editor: Not applicable