Parse a SELECT statement: SELECT [DISTINCT|ALL] (* | return_items) [FROM graph_expression [match_statement]] [WHERE] [GROUP BY] [HAVING] [ORDER BY] [LIMIT]
(tokens: &[Token])
| 949 | |
| 950 | /// Parse a SELECT statement: SELECT [DISTINCT|ALL] (* | return_items) [FROM graph_expression [match_statement]] [WHERE] [GROUP BY] [HAVING] [ORDER BY] [LIMIT] |
| 951 | fn select_statement(tokens: &[Token]) -> IResult<&[Token], SelectStatement> { |
| 952 | map( |
| 953 | tuple(( |
| 954 | expect_token(Token::Select), |
| 955 | opt(distinct_qualifier), |
| 956 | select_list, |
| 957 | opt(from_clause), |
| 958 | opt(where_clause), |
| 959 | opt(group_clause), |
| 960 | opt(having_clause), |
| 961 | opt(order_clause), |
| 962 | opt(limit_clause), |
| 963 | )), |
| 964 | |( |
| 965 | _, |
| 966 | distinct, |
| 967 | return_items, |
| 968 | from_clause, |
| 969 | where_clause, |
| 970 | group_clause, |
| 971 | having_clause, |
| 972 | order_clause, |
| 973 | limit_clause, |
| 974 | )| SelectStatement { |
| 975 | distinct: distinct.unwrap_or(DistinctQualifier::None), |
| 976 | return_items, |
| 977 | from_clause, |
| 978 | where_clause, |
| 979 | group_clause, |
| 980 | having_clause, |
| 981 | order_clause, |
| 982 | limit_clause, |
| 983 | location: Location::default(), |
| 984 | }, |
| 985 | )(tokens) |
| 986 | } |
| 987 | |
| 988 | /// Parse SELECT list: * | return_item (, return_item)* |
| 989 | fn select_list(tokens: &[Token]) -> IResult<&[Token], SelectItems> { |
no test coverage detected