HomePlaygroundExpressionsDocsDriversStatusChangelog GitHub

🪝 QAIL

The Decision Layer

Postgres stores facts, Qdrant stores meaning, Redis stores time — QAIL 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 String → DB Parses Again → Execute
⚠️ Raw SQL: "SELECT..." → DB Parses → Execute Errors at runtime.
✅ QAIL: AST → Binary Protocol → Execute Errors at compile-time.
cargo install qail
npm i qail-wasm
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 • WASM

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 Unified

Same Qail AST encodes to PostgreSQL and Qdrant. Relational AND vector search, 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.

🦀 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

β Beta
Qdrant

Qdrant

Vector • AI/ML • Semantic Search

α Alpha
Redis

Redis

Cache • Sessions • TTL

Planned

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

WASM / Node

npm i qail-wasm NPM

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:25  → get portfolio fields status
   📄 src/api.rs:102     → Qail::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

🌐

Browser

qail-wasm (~50KB)

📦

Node.js

npm install qail-wasm

Skip the String Layer.

Build with AST. Execute with Bytes.