memoized map of tables to collections of columns to be synchronized upwards to the base mapper.
(self)
| 4091 | |
| 4092 | @util.memoized_property |
| 4093 | def _table_to_equated(self): |
| 4094 | """memoized map of tables to collections of columns to be |
| 4095 | synchronized upwards to the base mapper.""" |
| 4096 | |
| 4097 | result: util.defaultdict[ |
| 4098 | Table, |
| 4099 | List[ |
| 4100 | Tuple[ |
| 4101 | Mapper[Any], |
| 4102 | List[Tuple[ColumnElement[Any], ColumnElement[Any]]], |
| 4103 | ] |
| 4104 | ], |
| 4105 | ] = util.defaultdict(list) |
| 4106 | |
| 4107 | def set_union(x, y): |
| 4108 | return x.union(y) |
| 4109 | |
| 4110 | for table in self._sorted_tables: |
| 4111 | cols = set(table.c) |
| 4112 | |
| 4113 | for m in self.iterate_to_root(): |
| 4114 | if m._inherits_equated_pairs and cols.intersection( |
| 4115 | reduce( |
| 4116 | set_union, |
| 4117 | [l.proxy_set for l, r in m._inherits_equated_pairs], |
| 4118 | ) |
| 4119 | ): |
| 4120 | result[table].append((m, m._inherits_equated_pairs)) |
| 4121 | |
| 4122 | return result |
| 4123 | |
| 4124 | |
| 4125 | class _OptGetColumnsNotAvailable(Exception): |
nothing calls this directly
no test coverage detected