memoized map of tables to collections of columns to be synchronized upwards to the base mapper.
(self)
| 4063 | |
| 4064 | @util.memoized_property |
| 4065 | def _table_to_equated(self): |
| 4066 | """memoized map of tables to collections of columns to be |
| 4067 | synchronized upwards to the base mapper.""" |
| 4068 | |
| 4069 | result: util.defaultdict[ |
| 4070 | Table, |
| 4071 | List[ |
| 4072 | Tuple[ |
| 4073 | Mapper[Any], |
| 4074 | List[Tuple[ColumnElement[Any], ColumnElement[Any]]], |
| 4075 | ] |
| 4076 | ], |
| 4077 | ] = util.defaultdict(list) |
| 4078 | |
| 4079 | def set_union(x, y): |
| 4080 | return x.union(y) |
| 4081 | |
| 4082 | for table in self._sorted_tables: |
| 4083 | cols = set(table.c) |
| 4084 | |
| 4085 | for m in self.iterate_to_root(): |
| 4086 | if m._inherits_equated_pairs and cols.intersection( |
| 4087 | reduce( |
| 4088 | set_union, |
| 4089 | [l.proxy_set for l, r in m._inherits_equated_pairs], |
| 4090 | ) |
| 4091 | ): |
| 4092 | result[table].append((m, m._inherits_equated_pairs)) |
| 4093 | |
| 4094 | return result |
| 4095 | |
| 4096 | |
| 4097 | class _OptGetColumnsNotAvailable(Exception): |
nothing calls this directly
no test coverage detected