Parse the items of a SELECT clause
(mut items: Vec<SelectItem>)
| 110 | |
| 111 | /// Parse the items of a SELECT clause |
| 112 | pub(crate) fn parse_projection(mut items: Vec<SelectItem>) -> SqlParseResult<Project> { |
| 113 | if items.len() == 1 { |
| 114 | return parse_project_or_agg(items.swap_remove(0)); |
| 115 | } |
| 116 | Ok(Project::Exprs( |
| 117 | items |
| 118 | .into_iter() |
| 119 | .map(parse_project_elem) |
| 120 | .collect::<SqlParseResult<_>>()?, |
| 121 | )) |
| 122 | } |
| 123 | |
| 124 | /// Parse a SELECT clause with only a single item |
| 125 | pub(crate) fn parse_project_or_agg(item: SelectItem) -> SqlParseResult<Project> { |
no test coverage detected
searching dependent graphs…