(
cls, compile_state, entities, entities_collection, is_current_entities
)
| 2607 | |
| 2608 | @classmethod |
| 2609 | def to_compile_state( |
| 2610 | cls, compile_state, entities, entities_collection, is_current_entities |
| 2611 | ): |
| 2612 | for idx, entity in enumerate(entities): |
| 2613 | if entity._is_lambda_element: |
| 2614 | if entity._is_sequence: |
| 2615 | cls.to_compile_state( |
| 2616 | compile_state, |
| 2617 | entity._resolved, |
| 2618 | entities_collection, |
| 2619 | is_current_entities, |
| 2620 | ) |
| 2621 | continue |
| 2622 | else: |
| 2623 | entity = entity._resolved |
| 2624 | |
| 2625 | if entity.is_clause_element: |
| 2626 | if entity.is_selectable: |
| 2627 | if "parententity" in entity._annotations: |
| 2628 | _MapperEntity( |
| 2629 | compile_state, |
| 2630 | entity, |
| 2631 | entities_collection, |
| 2632 | is_current_entities, |
| 2633 | ) |
| 2634 | else: |
| 2635 | _ColumnEntity._for_columns( |
| 2636 | compile_state, |
| 2637 | entity._select_iterable, |
| 2638 | entities_collection, |
| 2639 | idx, |
| 2640 | is_current_entities, |
| 2641 | ) |
| 2642 | else: |
| 2643 | if entity._annotations.get("bundle", False): |
| 2644 | _BundleEntity( |
| 2645 | compile_state, |
| 2646 | entity, |
| 2647 | entities_collection, |
| 2648 | is_current_entities, |
| 2649 | ) |
| 2650 | elif entity._is_clause_list: |
| 2651 | # this is legacy only - test_composites.py |
| 2652 | # test_query_cols_legacy |
| 2653 | _ColumnEntity._for_columns( |
| 2654 | compile_state, |
| 2655 | entity._select_iterable, |
| 2656 | entities_collection, |
| 2657 | idx, |
| 2658 | is_current_entities, |
| 2659 | ) |
| 2660 | else: |
| 2661 | _ColumnEntity._for_columns( |
| 2662 | compile_state, |
| 2663 | [entity], |
| 2664 | entities_collection, |
| 2665 | idx, |
| 2666 | is_current_entities, |
no test coverage detected