MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / parse_projection

Function parse_projection

crates/sql-parser/src/parser/mod.rs:112–122  ·  view source on GitHub ↗

Parse the items of a SELECT clause

(mut items: Vec<SelectItem>)

Source from the content-addressed store, hash-verified

110
111/// Parse the items of a SELECT clause
112pub(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
125pub(crate) fn parse_project_or_agg(item: SelectItem) -> SqlParseResult<Project> {

Callers 2

parse_selectFunction · 0.85
parse_selectFunction · 0.85

Calls 5

parse_project_or_aggFunction · 0.85
OkFunction · 0.50
lenMethod · 0.45
mapMethod · 0.45
into_iterMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…