MCPcopy Create free account
hub / github.com/GraphLite-AI/GraphLite / with_query

Function with_query

graphlite/src/ast/parser.rs:735–757  ·  view source on GitHub ↗

Parse WITH query: MATCH ... WITH ... [MATCH ... WITH ...] RETURN ...

(tokens: &[Token])

Source from the content-addressed store, hash-verified

733
734/// Parse WITH query: MATCH ... WITH ... [MATCH ... WITH ...] RETURN ...
735fn with_query(tokens: &[Token]) -> IResult<&[Token], Query> {
736 map(
737 tuple((
738 many1(query_segment),
739 return_clause,
740 opt(group_clause),
741 opt(having_clause),
742 opt(order_clause),
743 opt(limit_clause),
744 )),
745 |(segments, final_return, group_clause, having_clause, order_clause, limit_clause)| {
746 Query::WithQuery(WithQuery {
747 segments,
748 final_return,
749 group_clause,
750 having_clause,
751 order_clause,
752 limit_clause,
753 location: Location::default(),
754 })
755 },
756 )(tokens)
757}
758
759/// Parse LET statement: LET variable = expression [, variable = expression]*
760fn let_statement(tokens: &[Token]) -> IResult<&[Token], Query> {

Callers

nothing calls this directly

Calls 1

WithQueryClass · 0.85

Tested by

no test coverage detected