Return an iterator of MapperProperty objects which will render into a SELECT.
(self, mappers=None)
| 2954 | return None |
| 2955 | |
| 2956 | def _iterate_polymorphic_properties(self, mappers=None): |
| 2957 | """Return an iterator of MapperProperty objects which will render into |
| 2958 | a SELECT.""" |
| 2959 | if mappers is None: |
| 2960 | mappers = self._with_polymorphic_mappers |
| 2961 | |
| 2962 | if not mappers: |
| 2963 | for c in self.iterate_properties: |
| 2964 | yield c |
| 2965 | else: |
| 2966 | # in the polymorphic case, filter out discriminator columns |
| 2967 | # from other mappers, as these are sometimes dependent on that |
| 2968 | # mapper's polymorphic selectable (which we don't want rendered) |
| 2969 | for c in util.unique_list( |
| 2970 | chain( |
| 2971 | *[ |
| 2972 | list(mapper.iterate_properties) |
| 2973 | for mapper in [self] + mappers |
| 2974 | ] |
| 2975 | ) |
| 2976 | ): |
| 2977 | if getattr(c, "_is_polymorphic_discriminator", False) and ( |
| 2978 | self.polymorphic_on is None |
| 2979 | or c.columns[0] is not self.polymorphic_on |
| 2980 | ): |
| 2981 | continue |
| 2982 | yield c |
| 2983 | |
| 2984 | @HasMemoized.memoized_attribute |
| 2985 | def attrs(self) -> util.ReadOnlyProperties[MapperProperty[Any]]: |
no outgoing calls
no test coverage detected