Introduction to BQL
BQL (Better Query Language) is a query language inspired by EdgeDB that transpiles to SQL. It provides a more intuitive syntax for database operations while maintaining full SQL compatibility.
Why BQL?
Section titled “Why BQL?”SQL is powerful but verbose. BQL offers:
- Shape-based selection: Define which fields to return using
{ }syntax - Intuitive filtering: Use
filterkeyword with clean syntax - Assignment syntax: Use
:=for setting values - SQL compatibility: Transpiles to standard SQL
Quick Example
Section titled “Quick Example”-- BQLselect Market { id, question, probability }filter probability > 50limit 10
-- Transpiled SQLSELECT id, question, probabilityFROM MarketWHERE probability > 50LIMIT 10Getting Started
Section titled “Getting Started”Check out the Quick Start guide to start using BQL in your project.
Try It
Section titled “Try It”Visit the Playground to try BQL in your browser.