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)
| 874 | |
| 875 | @_generative |
| 876 | def enable_eagerloads(self, value: bool) -> Self: |
| 877 | """Control whether or not eager joins and subqueries are |
| 878 | rendered. |
| 879 | |
| 880 | When set to False, the returned Query will not render |
| 881 | eager joins regardless of :func:`~sqlalchemy.orm.joinedload`, |
| 882 | :func:`~sqlalchemy.orm.subqueryload` options |
| 883 | or mapper-level ``lazy='joined'``/``lazy='subquery'`` |
| 884 | configurations. |
| 885 | |
| 886 | This is used primarily when nesting the Query's |
| 887 | statement into a subquery or other |
| 888 | selectable, or when using :meth:`_query.Query.yield_per`. |
| 889 | |
| 890 | """ |
| 891 | self._compile_options += {"_enable_eagerloads": value} |
| 892 | return self |
| 893 | |
| 894 | @_generative |
| 895 | def _with_compile_options(self, **opt: Any) -> Self: |
no outgoing calls