Module parser

Module parser 

Source
Expand description

QAIL Parser using nom.

Parses QAIL syntax into an AST.

§Syntax Overview (v2.0 - Rust Native)

get::users:'id'email [ 'active == true, -created_at, 0..10 ]
─┬─ ─┬─ ─┬────┬──── ─────────────────┬────────────────────
 │   │   │    │                      │
 │   │   │    │                      └── Unified Block (filters, sorts, ranges)
 │   │   │    └── Labels (columns with ')
 │   │   └── Link (connects to table with :)
 │   └── Table name
 └── Gate (action with ::)

§Syntax v2.0 Reference

SymbolNameFunctionExample
::GateActionget::users
:LinkTable to columnsget::users:'id
'LabelColumn marker'email'name
'_InferAll columns'_*
==EqualFilter'active == true
~MatchFuzzy/ILIKE'name ~ "john"
-DescSort descending-created_at
+AscSort ascending+id
..RangeLimit/Offset0..10 = LIMIT 10 OFFSET 0
->InnerInner Joinusers -> posts
<-LeftLeft Joinusers <- posts
->>RightRight Joinorders ->> customers
$ParamBind variable$1

Functions§

parse
Parse a complete QAIL query string.