MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / parse_select_item

Method parse_select_item

src/sql-parser/src/parser.rs:8742–8750  ·  view source on GitHub ↗

Parse a comma-delimited list of projections after SELECT

(&mut self)

Source from the content-addressed store, hash-verified

8740
8741 /// Parse a comma-delimited list of projections after SELECT
8742 fn parse_select_item(&mut self) -> Result<SelectItem<Raw>, ParserError> {
8743 if self.consume_token(&Token::Star) {
8744 return Ok(SelectItem::Wildcard);
8745 }
8746 Ok(SelectItem::Expr {
8747 expr: self.parse_expr()?,
8748 alias: self.parse_optional_alias(Keyword::is_reserved_in_column_alias)?,
8749 })
8750 }
8751
8752 /// Parse an expression, optionally followed by ASC or DESC,
8753 /// and then `[NULLS { FIRST | LAST }]` (used in ORDER BY)

Callers 1

parse_selectMethod · 0.80

Calls 3

consume_tokenMethod · 0.80
parse_exprMethod · 0.80
parse_optional_aliasMethod · 0.80

Tested by

no test coverage detected