NEW  New: cqlint (lint + format), cql-migrate and cqlprof → see the benchmarks

Typesafe CQL.
Written in Rust.

Seven small tools that move mistakes and slowdowns in Cassandra and ScyllaDB queries from production to compile time and CI: typed, checked against current Cassandra, and measured for performance.

$ cargo install cqlc
The family

Seven tools, one foundation

All of them build on the ScyllaDB Rust driver and cqlc-core, the lexer, parser, schema resolver and type checker that checks every statement.

Schema-first

cqlc

Write .cql schema and named queries. cqlc type-checks them offline against Cassandra 4.0 to 5.0 CQL (vectors, SAI, ANN search) and generates typed async Rust.

3.8×faster parsing than sqlparser on identical statements

Read more →
Code-first

cqlx

Write a Rust struct. #[derive(CqlEntity)] generates the table, inserts and a type-state query builder that cannot forget a partition key.

95–97 %of the raw driver on YCSB; 1.0 with partial updates, LWT, batches, streaming

Read more →
Performance

cql-ai

A 0.6M-parameter Transformer that predicts performance bottlenecks from the statement and your data shape, trained on measured latencies of public workloads.

0.86macro-F1 on unseen data shapes; keyword rules reach 0.56

Read more →
Design

cqlz-gym

Give it entities and a query workload; it designs the Cassandra tables. An exact ILP and a small learned policy search, cqlc-core verifies every candidate.

+8 %+8 %SMALL

Read more →
Lint + format

cqlint

A ruff for CQL: formats your files and flags ALLOW FILTERING, tombstone writes, unbounded scans and more. Type-aware with your schema.

0.24 sto lint 3,600 files (23 MB)

Read more →
Migrations

cql-migrate

Ordered, checksummed, locked schema migrations with offline chain checks, schema diff and live drift detection.

2 engineslifecycle tested on ScyllaDB and Cassandra 5.0

Read more →
Profiling

cqlprof

EXPLAIN for CQL: runs a SELECT with tracing and tells you about tombstones, sstables, replicas and tail latency.

PROF001found 2,990 tombstones behind 10 live rows

Read more →
Measured, not claimed

Parsing CQL, on identical statements

Time to parse the same 22 statements (lower is better)
cqlc parser
33 µs
sqlparser
126 µs
cqlc's complete analysis, which also type-checks every query against the schema, takes 103 µs for all 36 statements. sqlparser parses SQL, not CQL, so it only accepts 22 of them. All benchmarks and caveats →
How they fit together

One parser under everything

.cql filesschema + queries
→
cqlc-corelexer, parser, resolver, type checker
→
cqlctyped Rust code
Rust structs#[derive(CqlEntity)]
→
cqlxtype-state builders, CREATE TABLE
→
cqlx schemaCQL checked by cqlc-core
.cql filesqueries in your repo
→
cqlc-core lexerfixed integer ids
→
cql-aiTransformer, CI warnings
entities + workloadTOML
→
cqlz-gymILP and learned policy, verified by cqlc-core
→
schema.cqlfeeds cqlc and cqlx