(&mut self, natural: bool)
| 8574 | } |
| 8575 | |
| 8576 | fn parse_join_constraint(&mut self, natural: bool) -> Result<JoinConstraint<Raw>, ParserError> { |
| 8577 | if natural { |
| 8578 | Ok(JoinConstraint::Natural) |
| 8579 | } else if self.parse_keyword(ON) { |
| 8580 | let constraint = self.parse_expr()?; |
| 8581 | Ok(JoinConstraint::On(constraint)) |
| 8582 | } else if self.parse_keyword(USING) { |
| 8583 | let columns = self.parse_parenthesized_column_list(Mandatory)?; |
| 8584 | let alias = self.parse_optional_alias(Keyword::is_reserved_in_table_alias)?; |
| 8585 | |
| 8586 | Ok(JoinConstraint::Using { columns, alias }) |
| 8587 | } else { |
| 8588 | self.expected( |
| 8589 | self.peek_pos(), |
| 8590 | "ON, or USING after JOIN", |
| 8591 | self.peek_token(), |
| 8592 | ) |
| 8593 | } |
| 8594 | } |
| 8595 | |
| 8596 | /// Parse an INSERT statement |
| 8597 | fn parse_insert(&mut self) -> Result<Statement<Raw>, ParserError> { |
no test coverage detected