Parse a CTE (`alias [( col1, col2, ... )] AS (subquery)`)
(&mut self)
| 7679 | |
| 7680 | /// Parse a CTE (`alias [( col1, col2, ... )] AS (subquery)`) |
| 7681 | fn parse_cte(&mut self) -> Result<Cte<Raw>, ParserError> { |
| 7682 | let alias = TableAlias { |
| 7683 | name: self.parse_identifier()?, |
| 7684 | columns: self.parse_parenthesized_column_list(Optional)?, |
| 7685 | strict: false, |
| 7686 | }; |
| 7687 | self.expect_keyword(AS)?; |
| 7688 | self.expect_token(&Token::LParen)?; |
| 7689 | let query = self.parse_query()?; |
| 7690 | self.expect_token(&Token::RParen)?; |
| 7691 | Ok(Cte { |
| 7692 | alias, |
| 7693 | query, |
| 7694 | id: (), |
| 7695 | }) |
| 7696 | } |
| 7697 | |
| 7698 | /// Parse a mutually recursive CTE (`alias ( col1: typ1, col2: typ2, ... ) AS (subquery)`). |
| 7699 | /// |
nothing calls this directly
no test coverage detected