Expand description
Native RushDB query-document parser.
Accepts the database query-document shape and lowers it onto the
shared Expr/RelatedExpr execution model:
{ "labels": ["..."], "where": { "status": {"$in": [...]} },
"select": {...}, "groupBy": [...], "orderBy": {...}, "limit": 10, "skip": 0 }where supports flat-key implicit $and, $eq/$ne/$gt/$gte/$lt/$lte/ $in/$nin/$contains/$startsWith/$endsWith/$exists/$type, logical
$and/$or/$nor/$xor/$not, $id, label-key relationship blocks with
$alias, $relation (type + direction + hops), $cycle, and nested
multi-level blocks.
Structs§
- Parsed
Query - Full query document lowered onto the execution model. Also exposes whether the query is a listing (no groupBy) or aggregate (groupBy or select with metrics).
Enums§
- Query
Document Error - Errors produced while lowering a query document.
Functions§
- collect_
alias_ map - Collect every traversal alias (and nested aliases) reachable in a
whereexpression, recording the full path from the root to each alias level. - parse_
document - Parse a complete query document into its execution model.
- parse_
select - Parse a
selectobject into aggregate request metrics. select value forms:"$record.field","$alias","$alias.field",{"$count": "*" | "$alias" | "$alias.field"},{"$sum": "$record.field"},{"$avg": ...},{"$min": ...},{"$max": ...}. - parse_
where - Parse a documented
whereobject into a rootExpr(withRelatednodes for traversal blocks). Flat keys become implicit$andconjuncts.
Type Aliases§
- Collect
Alias Map - Alias → full traversal path (each level’s labels/rel-type/direction plus
that level’s
wherepredicates), resolved from thewhereclause so alias-based$collect.fromreuses a declared traversal alias. Multi-hop aliases keep every step; alias$count/$sumshare the same shape.