Control whether or not eager joins and subqueries are rendered. When set to False, the returned Query will not render eager joins regardless of :func:`~sqlalchemy.orm.joinedload`, :func:`~sqlalchemy.orm.subqueryload` options or mapper-level ``lazy='joined'``/
(self, value: bool)
| 892 | |
| 893 | @_generative |
| 894 | def enable_eagerloads(self, value: bool) -> Self: |
| 895 | """Control whether or not eager joins and subqueries are |
| 896 | rendered. |
| 897 | |
| 898 | When set to False, the returned Query will not render |
| 899 | eager joins regardless of :func:`~sqlalchemy.orm.joinedload`, |
| 900 | :func:`~sqlalchemy.orm.subqueryload` options |
| 901 | or mapper-level ``lazy='joined'``/``lazy='subquery'`` |
| 902 | configurations. |
| 903 | |
| 904 | This is used primarily when nesting the Query's |
| 905 | statement into a subquery or other |
| 906 | selectable, or when using :meth:`_query.Query.yield_per`. |
| 907 | |
| 908 | """ |
| 909 | self._compile_options += {"_enable_eagerloads": value} |
| 910 | return self |
| 911 | |
| 912 | @_generative |
| 913 | def _with_compile_options(self, **opt: Any) -> Self: |
no outgoing calls