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

Function query_segment

graphlite/src/ast/parser.rs:871–891  ·  view source on GitHub ↗

Parse a query segment: MATCH [WHERE] [WITH] [WHERE] [ORDER BY] [LIMIT] [UNWIND ... AS ...] [WHERE]

(tokens: &[Token])

Source from the content-addressed store, hash-verified

869
870/// Parse a query segment: MATCH [WHERE] [WITH] [WHERE] [ORDER BY] [LIMIT] [UNWIND ... AS ...] [WHERE]
871fn query_segment(tokens: &[Token]) -> IResult<&[Token], QuerySegment> {
872 map(
873 tuple((
874 match_clause,
875 opt(where_clause),
876 opt(with_clause),
877 opt(unwind_clause),
878 opt(where_clause),
879 )),
880 |(match_clause, where_clause, with_clause, unwind_clause, post_unwind_where)| {
881 QuerySegment {
882 match_clause,
883 where_clause,
884 with_clause,
885 unwind_clause,
886 post_unwind_where,
887 location: Location::default(),
888 }
889 },
890 )(tokens)
891}
892
893/// Parse UNION or EXCEPT operation
894fn parse_union_except_op(tokens: &[Token]) -> IResult<&[Token], (SetOperationType, Query)> {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected