(&mut self, relation: SqlRelation)
| 467 | |
| 468 | impl PqFold for RelVarNameAssigner<'_> { |
| 469 | fn fold_sql_relation(&mut self, relation: SqlRelation) -> Result<SqlRelation> { |
| 470 | // only fold AtomicPipelines |
| 471 | Ok(match relation { |
| 472 | SqlRelation::AtomicPipeline(pipeline) => { |
| 473 | // save outer names, so they are not affected by the inner pipeline |
| 474 | // (this matters for loop, where you have nested pipelines) |
| 475 | let outer_names = std::mem::take(&mut self.relation_instance_names); |
| 476 | |
| 477 | let res = self.fold_sql_transforms(pipeline)?; |
| 478 | |
| 479 | self.relation_instance_names = outer_names; |
| 480 | SqlRelation::AtomicPipeline(res) |
| 481 | } |
| 482 | _ => relation, |
| 483 | }) |
| 484 | } |
| 485 | } |
| 486 | |
| 487 | impl PqMapper<RelationExpr, RelationExpr, (), ()> for RelVarNameAssigner<'_> { |
no test coverage detected