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
| Symbol | Name | Function | Example |
|---|---|---|---|
:: | Gate | Action | get::users |
: | Link | Table to columns | get::users:'id |
' | Label | Column marker | 'email'name |
'_ | Infer | All columns | '_ → * |
== | Equal | Filter | 'active == true |
~ | Match | Fuzzy/ILIKE | 'name ~ "john" |
- | Desc | Sort descending | -created_at |
+ | Asc | Sort ascending | +id |
.. | Range | Limit/Offset | 0..10 = LIMIT 10 OFFSET 0 |
-> | Inner | Inner Join | users -> posts |
<- | Left | Left Join | users <- posts |
->> | Right | Right Join | orders ->> customers |
$ | Param | Bind variable | $1 |
Functions§
- parse
- Parse a complete QAIL query string.