Skip to content

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.

SQL is powerful but verbose. BQL offers:

  • Shape-based selection: Define which fields to return using { } syntax
  • Intuitive filtering: Use filter keyword with clean syntax
  • Assignment syntax: Use := for setting values
  • SQL compatibility: Transpiles to standard SQL
-- BQL
select Market { id, question, probability }
filter probability > 50
limit 10
-- Transpiled SQL
SELECT id, question, probability
FROM Market
WHERE probability > 50
LIMIT 10

Check out the Quick Start guide to start using BQL in your project.

Visit the Playground to try BQL in your browser.