Parse MATCH DELETE statement: MATCH pattern... [WITH ...] [WHERE condition] [DETACH] DELETE expression, expression
(tokens: &[Token])
| 4031 | |
| 4032 | /// Parse MATCH DELETE statement: MATCH pattern... [WITH ...] [WHERE condition] [DETACH] DELETE expression, expression |
| 4033 | fn match_delete_statement(tokens: &[Token]) -> IResult<&[Token], MatchDeleteStatement> { |
| 4034 | map( |
| 4035 | tuple(( |
| 4036 | match_clause, |
| 4037 | opt(with_clause), |
| 4038 | opt(where_clause), |
| 4039 | opt(alt(( |
| 4040 | expect_token(Token::Detach), |
| 4041 | expect_token(Token::NoDetach), |
| 4042 | ))), |
| 4043 | expect_token(Token::Delete), |
| 4044 | separated_list1(expect_token(Token::Comma), expression), |
| 4045 | )), |
| 4046 | |(match_clause, with_clause_opt, where_clause_opt, detach_mode, _, expressions)| { |
| 4047 | MatchDeleteStatement { |
| 4048 | match_clause, |
| 4049 | with_clause: with_clause_opt, |
| 4050 | where_clause: where_clause_opt, |
| 4051 | expressions, |
| 4052 | detach: match detach_mode { |
| 4053 | Some(Token::Detach) => true, |
| 4054 | Some(Token::NoDetach) => false, |
| 4055 | None => false, |
| 4056 | _ => false, // Default to false for any other token |
| 4057 | }, |
| 4058 | location: Location::default(), |
| 4059 | } |
| 4060 | }, |
| 4061 | )(tokens) |
| 4062 | } |
| 4063 | |
| 4064 | /// Parse INSERT statement: INSERT graph_pattern |
| 4065 | fn insert_statement(tokens: &[Token]) -> IResult<&[Token], InsertStatement> { |
nothing calls this directly
no test coverage detected