HomePlaygroundExpressionsDocsDriversBlogStatusRoadmapChangelog GitHub

🪝 QAIL

The Decision Layer

Postgres stores facts, Qdrant stores meaning, Redis stores timeQAIL decides.

✅ PostgreSQL Your source of truth
✅ Qdrant Semantic search & embeddings
✅ Redis Caching & ephemeral state
QAIL AST
Qail::get("users")
    .select_all()
    .filter("active", Eq, true)
POSTGRESQL
SELECT * FROM users WHERE active = true
QDRANT
{ "must": [{ "key": "active", "match": true }] }
ORMs: Code → Parse → AST → SQL StringDB Parses Again → Execute
⚠️ Raw SQL: "SELECT..." → DB Parses → Execute Errors at runtime.
QAIL: AST → Binary Protocol → Execute Errors at compile-time.
cargo install qail
zig fetch --save ...qail-zig/v0.2.0.tar.gz
Rust Python Go PHP Java Node C/C++ Rust Python Go PHP Java Node C/C++

Native Rust • Universal C-API • FFI Bindings

Why QAIL?

AST-first. Native drivers. Zero transpilation overhead.

🧬

AST-First Architecture

Build queries as native data structures. No string parsing. No text-to-AST-to-text overhead.

🔌

Native Database Drivers

Direct wire protocol. No SQLx middleman. Full control over connection and execution.

🛡️

Structurally Safe

Injection impossible by design. Code and data separated at the AST level, not string level.

🌐

SQL + Vector + Cache Unified

Same Qail AST encodes to PostgreSQL, Qdrant, and Redis. Relational, vector, AND cache — one syntax.

Zero Overhead

No runtime parsing. AST is built at compile time, serialized directly to wire protocol.

🎯

Type Safe End-to-End

Schema validation at build time. Wrong queries don't compile. Wrong types don't bind.

🔐

Built-in Row-Level Security

AST-level tenant injection for multi-tenant SaaS. Qail::with_rls(ctx) auto-scopes every query — no manual WHERE clauses, no data leaks.

🔗

Compile-Time Join Safety

TypedQail<T> + RelatedTo<T> — the compiler rejects invalid table joins. Schema-aware codegen from build.rs.

🦀 QAIL's Position

4% faster than C
353k vs 339k q/s
12% ahead of Go
pgx 303k q/s
16x faster
Python asyncpg ~21k q/s
View full benchmarks →

Supported Databases

One AST. Three powerhouses. Facts + Meaning + Time.

PostgreSQL

PostgreSQL

Relational • Transactions • ACID

Production
Qdrant

Qdrant

Vector • AI/ML • Semantic Search

Production
Redis

Redis

Cache • Sessions • TTL

Production

The modern stack: PostgreSQL for facts, Qdrant for meaning, Redis for time.

Language Drivers

Native packages for your language. All powered by one Rust core.

Zig

Zig

Pure Zig • TLS • Pool v0.2.0
Rust

Rust

cargo add qail-core Cargo
PHP

PHP

31K q/s • 2.6x Eloquent GitHub
Go

Go

126K q/s • 4.2x GORM GitHub
Python

Python

130K rows/s COPY GitHub
Node.js

Node.js

FFI • Native Addon GitHub

View all drivers →

🛡️ The "Wait, Stop!" Feature

The only migration tool that reads your code before it touches your data.

Terminal
$ qail migrate up schema.qail --codebase ./src

🛑 BLOCKED: Safety Check Failed

You are dropping column 'status', but it is still used in:

   📄 src/queries.ts:25get portfolio fields status
   📄 src/api.rs:102Qail::get("portfolio").filter("status"...)

Fix your code first, or use --force to proceed.
🔍

Scans Before Running

Searches .rs, .ts, .js, .py for queries that reference changing columns

📍

Points to Line Numbers

Shows exactly where your code needs updating before migration

🎯

You're the Boss

Use --force to override when you know better

One Language. Everywhere.

Rust

Rust

qail-core + builder API

C-API / FFI

Universal native bindings

💻

CLI

cargo install qail

Skip the String Layer.

Build with AST. Execute with Bytes.