(
self,
context,
query_entity,
path,
loadopt,
mapper,
result,
adapter,
populators,
)
| 2808 | return False |
| 2809 | |
| 2810 | def create_row_processor( |
| 2811 | self, |
| 2812 | context, |
| 2813 | query_entity, |
| 2814 | path, |
| 2815 | loadopt, |
| 2816 | mapper, |
| 2817 | result, |
| 2818 | adapter, |
| 2819 | populators, |
| 2820 | ): |
| 2821 | |
| 2822 | if not context.compile_state.compile_options._enable_eagerloads: |
| 2823 | return |
| 2824 | |
| 2825 | if not self.parent.class_manager[self.key].impl.supports_population: |
| 2826 | raise sa_exc.InvalidRequestError( |
| 2827 | "'%s' does not support object " |
| 2828 | "population - eager loading cannot be applied." % self |
| 2829 | ) |
| 2830 | |
| 2831 | if self.uselist: |
| 2832 | context.loaders_require_uniquing = True |
| 2833 | |
| 2834 | our_path = path[self.parent_property] |
| 2835 | |
| 2836 | eager_adapter = self._create_eager_adapter( |
| 2837 | context, result, adapter, our_path, loadopt |
| 2838 | ) |
| 2839 | |
| 2840 | if eager_adapter is not False: |
| 2841 | key = self.key |
| 2842 | |
| 2843 | _instance = loading._instance_processor( |
| 2844 | query_entity, |
| 2845 | self.mapper, |
| 2846 | context, |
| 2847 | result, |
| 2848 | our_path[self.entity], |
| 2849 | eager_adapter, |
| 2850 | ) |
| 2851 | |
| 2852 | if not self.uselist: |
| 2853 | self._create_scalar_loader(context, key, _instance, populators) |
| 2854 | else: |
| 2855 | self._create_collection_loader( |
| 2856 | context, key, _instance, populators |
| 2857 | ) |
| 2858 | else: |
| 2859 | self.parent_property._get_strategy( |
| 2860 | (("lazy", "select"),) |
| 2861 | ).create_row_processor( |
| 2862 | context, |
| 2863 | query_entity, |
| 2864 | path, |
| 2865 | loadopt, |
| 2866 | mapper, |
| 2867 | result, |
nothing calls this directly
no test coverage detected