Relabel the alias values of any children. 'change_map' is a dictionary mapping old (current) alias values to the new values.
(self, change_map)
| 201 | self.children = children |
| 202 | |
| 203 | def relabel_aliases(self, change_map): |
| 204 | """ |
| 205 | Relabel the alias values of any children. 'change_map' is a dictionary |
| 206 | mapping old (current) alias values to the new values. |
| 207 | """ |
| 208 | if not change_map: |
| 209 | return self |
| 210 | for pos, child in enumerate(self.children): |
| 211 | if hasattr(child, "relabel_aliases"): |
| 212 | # For example another WhereNode |
| 213 | child.relabel_aliases(change_map) |
| 214 | elif hasattr(child, "relabeled_clone"): |
| 215 | self.children[pos] = child.relabeled_clone(change_map) |
| 216 | |
| 217 | def clone(self): |
| 218 | clone = self.create(connector=self.connector, negated=self.negated) |
no test coverage detected