Parse FROM graph expression: graph_expression [match_statement] OR just match_statement NON-STANDARD EXTENSION: This parser supports "FROM MATCH ..." syntax for convenience, which is not part of ISO GQL standard. In ISO GQL, FROM clause requires a graph expression. Standard syntax: SELECT ... FROM /graph/path MATCH ... Extension syntax: SELECT ... FROM MATCH ... (uses current session graph)
(tokens: &[Token])
| 1024 | /// Standard syntax: SELECT ... FROM /graph/path MATCH ... |
| 1025 | /// Extension syntax: SELECT ... FROM MATCH ... (uses current session graph) |
| 1026 | fn from_graph_expression(tokens: &[Token]) -> IResult<&[Token], FromGraphExpression> { |
| 1027 | alt(( |
| 1028 | // NON-STANDARD: Support "FROM MATCH ..." syntax (Neo4j Cypher-style) |
| 1029 | // This uses the current session graph implicitly |
| 1030 | map(match_clause, |match_statement| FromGraphExpression { |
| 1031 | // Use CurrentGraph to indicate session graph should be used |
| 1032 | graph_expression: GraphExpression::CurrentGraph, |
| 1033 | match_statement: Some(match_statement), |
| 1034 | location: Location::default(), |
| 1035 | }), |
| 1036 | // STANDARD: FROM graph_expression [MATCH ...] |
| 1037 | map( |
| 1038 | tuple((graph_expression, opt(match_clause))), |
| 1039 | |(graph_expression, match_statement)| FromGraphExpression { |
| 1040 | graph_expression, |
| 1041 | match_statement, |
| 1042 | location: Location::default(), |
| 1043 | }, |
| 1044 | ), |
| 1045 | ))(tokens) |
| 1046 | } |
| 1047 | |
| 1048 | /// Parse DISTINCT qualifier: DISTINCT | ALL |
| 1049 | fn distinct_qualifier(tokens: &[Token]) -> IResult<&[Token], DistinctQualifier> { |
nothing calls this directly
no outgoing calls
no test coverage detected