🎯 Vision
"SQL is a text protocol designed for humans to type.
QAIL is a binary protocol designed for machines to optimize."
The Evolution
Era 1 SQL Strings "Trust me, this string is safe"
Era 2 ORMs "Safe, but locked to one language"
Era 3 Query Builders "Safe, but still generates strings"
Era 4 SQLx "Compile-time checked SQL — the breakthrough"
Era 5 QAIL "Pure AST that compiles directly to wire protocol"
Acknowledgment: SQLx pioneered compile-time SQL validation in Rust and remains the
gold standard for SQL-based database access. QAIL builds on this foundation by eliminating strings
entirely — a natural evolution, not a replacement.
✅ Completed
Done Core AST (qail-core)
- ✓ QailCmd universal AST representation
- ✓ DML: get, add, set, del commands
- ✓ DDL: make (CREATE TABLE), index (CREATE INDEX)
- ✓ Joins: left/right/inner with ON conditions
- ✓ CTEs: WITH clause support
- ✓ Expressions: CASE WHEN, aggregates, window functions
- ✓ Builder API for type-safe query construction
Done PostgreSQL Driver (qail-pg)
- ✓ Wire protocol types (FrontendMessage, BackendMessage)
- ✓ AstEncoder: AST → BytesMut (DML + DDL)
- ✓ Native TLS support (Let's Encrypt)
- ✓ Connection handling with tokio
- ✓ Layer 2/3 separation (protocol/ vs driver/)
Done Developer Tools
- ✓ CLI: qail command with REPL
- ✓ LSP: VS Code extension
- ✓ WASM: Browser playground
🚀 In Progress: v0.9.0
Theme: "AST to Bytes, No Strings Attached"
In Progress Wire Protocol
- ○ Extended Query Protocol (Parse/Bind/Execute)
- ○ Parameter binding in wire protocol
- ○ Row decoding (bytes → typed values)
- ○ Connection pooling skeleton
- ○ Transaction support (BEGIN/COMMIT/ROLLBACK)
🔮 Future: v1.0.0
Theme: "Production Ready"
Planned Core Features
- ○ Full Extended Query Protocol
- ○ Prepared statement caching
- ○ SCRAM-SHA-256 authentication
- ○ Zero-copy row decoding
- ○ Pipeline mode (batch queries)
Planned Multi-Database
- ○ qail-mysql — MySQL wire protocol
- ○ qail-sqlite — SQLite (embedded, no network)
💡 Philosophy
"QAIL eliminates SQL strings entirely. The builder API (QailCmd::get(), QailCmd::add()) is the ONLY way to construct queries. No parsing at runtime, no strings anywhere."