MCPcopy Create free account
hub / github.com/PRQL/prql / fold_sql_query

Method fold_sql_query

prqlc/prqlc/src/sql/pq/ast.rs:207–216  ·  view source on GitHub ↗
(&mut self, query: SqlQuery)

Source from the content-addressed store, hash-verified

205
206pub trait PqFold: PqMapper<RelationExpr, RelationExpr, (), ()> {
207 fn fold_sql_query(&mut self, query: SqlQuery) -> Result<SqlQuery> {
208 Ok(SqlQuery {
209 ctes: query
210 .ctes
211 .into_iter()
212 .map(|c| self.fold_cte(c))
213 .try_collect()?,
214 main_relation: self.fold_sql_relation(query.main_relation)?,
215 })
216 }
217
218 fn fold_sql_relation(&mut self, relation: SqlRelation) -> Result<SqlRelation> {
219 Ok(match relation {

Callers

nothing calls this directly

Implementers 1

postprocess.rsprqlc/prqlc/src/sql/pq/postprocess.rs

Calls 4

mapMethod · 0.80
into_iterMethod · 0.80
fold_cteMethod · 0.80
fold_sql_relationMethod · 0.45

Tested by

no test coverage detected