(
cls, compile_state, entities, entities_collection, is_current_entities
)
| 2748 | |
| 2749 | @classmethod |
| 2750 | def to_compile_state( |
| 2751 | cls, compile_state, entities, entities_collection, is_current_entities |
| 2752 | ): |
| 2753 | for idx, entity in enumerate(entities): |
| 2754 | if entity._is_lambda_element: |
| 2755 | if entity._is_sequence: |
| 2756 | cls.to_compile_state( |
| 2757 | compile_state, |
| 2758 | entity._resolved, |
| 2759 | entities_collection, |
| 2760 | is_current_entities, |
| 2761 | ) |
| 2762 | continue |
| 2763 | else: |
| 2764 | entity = entity._resolved |
| 2765 | |
| 2766 | if entity.is_clause_element: |
| 2767 | if entity.is_selectable: |
| 2768 | if "parententity" in entity._annotations: |
| 2769 | _MapperEntity( |
| 2770 | compile_state, |
| 2771 | entity, |
| 2772 | entities_collection, |
| 2773 | is_current_entities, |
| 2774 | ) |
| 2775 | else: |
| 2776 | _ColumnEntity._for_columns( |
| 2777 | compile_state, |
| 2778 | entity._select_iterable, |
| 2779 | entities_collection, |
| 2780 | idx, |
| 2781 | is_current_entities, |
| 2782 | ) |
| 2783 | else: |
| 2784 | if entity._annotations.get("bundle", False): |
| 2785 | _BundleEntity( |
| 2786 | compile_state, |
| 2787 | entity, |
| 2788 | entities_collection, |
| 2789 | is_current_entities, |
| 2790 | ) |
| 2791 | elif entity._is_clause_list: |
| 2792 | # this is legacy only - test_composites.py |
| 2793 | # test_query_cols_legacy |
| 2794 | _ColumnEntity._for_columns( |
| 2795 | compile_state, |
| 2796 | entity._select_iterable, |
| 2797 | entities_collection, |
| 2798 | idx, |
| 2799 | is_current_entities, |
| 2800 | ) |
| 2801 | else: |
| 2802 | _ColumnEntity._for_columns( |
| 2803 | compile_state, |
| 2804 | [entity], |
| 2805 | entities_collection, |
| 2806 | idx, |
| 2807 | is_current_entities, |
no test coverage detected