Documentation
Welcome to FlyQL project documentation. Current version is 0.0.52 (changelog).
FlyQL is a lightweight, human-readable query language designed for filtering data. It transpiles into injection-proof SQL across ClickHouse, PostgreSQL, and StarRocks — with full implementations in Go, Python, and JavaScript. Write a query once, and FlyQL generates dialect-specific SQL for your database — or evaluates it in-memory against data records.
status >= 400 and host like 'prod%' and not debug
This query works identically whether your backend is ClickHouse, PostgreSQL, StarRocks, or an in-memory dataset.
Key Features
Section titled “Key Features”- Injection-Proof by Design — The grammar cannot express subqueries, JOINs, UNIONs, or DDL. Security is structural, not defensive. All values are escaped in the generated SQL.
- Multi-Dialect SQL — One query language, dialect-specific output. Generates correct SQL for ClickHouse, PostgreSQL, and StarRocks with proper type handling (JSON paths, Map access, Array handling).
- Multi-Language — Full implementations in Go, Python, and JavaScript. Parse on the frontend, validate on the backend, generate SQL anywhere — same query, same results.
- Parameterized Queries —
$nameand$1placeholders that are resolved at runtime viabindParams(). Template a query once, bind values safely later — no string concatenation, no escaping by hand. - Minimal Dependencies — Hand-written state-machine parser with zero external dependencies in Go and JavaScript. Python pulls in
google-re2for RE2-safe regex matching. Trivial to integrate, nothing to conflict with.
Quick Example
Section titled “Quick Example”service != api and (status >= 400 or level = error) and message ~ "timeout.*"
| Component | Meaning |
|---|---|
service != api | service field is not "api" |
status >= 400 | status is 400 or greater |
level = error | level field equals "error" |
message ~ "timeout.*" | message matches regex pattern |
and, or | boolean logic, standard precedence (not > and > or) |
( ) | explicit grouping |
Supported Languages
Section titled “Supported Languages”| Language | Parser | In-Memory Matcher |
|---|---|---|
| Go | Yes | Yes |
| Python | Yes | Yes |
| JavaScript | Yes | Yes |
SQL Generators
Section titled “SQL Generators”| Database | Go | Python | JavaScript |
|---|---|---|---|
| ClickHouse | Yes | Yes | Yes |
| PostgreSQL | Yes | Yes | Yes |
| StarRocks | Yes | Yes | Yes |