(&mut self)
| 7464 | } |
| 7465 | |
| 7466 | fn parse_delete(&mut self) -> Result<Statement<Raw>, ParserError> { |
| 7467 | self.expect_keyword(FROM)?; |
| 7468 | let table_name = RawItemName::Name(self.parse_item_name()?); |
| 7469 | let alias = self.parse_optional_table_alias()?; |
| 7470 | let using = if self.parse_keyword(USING) { |
| 7471 | self.parse_comma_separated(Parser::parse_table_and_joins)? |
| 7472 | } else { |
| 7473 | vec![] |
| 7474 | }; |
| 7475 | let selection = if self.parse_keyword(WHERE) { |
| 7476 | Some(self.parse_expr()?) |
| 7477 | } else { |
| 7478 | None |
| 7479 | }; |
| 7480 | |
| 7481 | Ok(Statement::Delete(DeleteStatement { |
| 7482 | table_name, |
| 7483 | alias, |
| 7484 | using, |
| 7485 | selection, |
| 7486 | })) |
| 7487 | } |
| 7488 | |
| 7489 | /// Parses a SELECT (or WITH, VALUES, TABLE) statement with optional AS OF. |
| 7490 | fn parse_select_statement(&mut self) -> Result<SelectStatement<Raw>, ParserError> { |
no test coverage detected