Return the 'final' SELECT statement for this :class:`.Query`. This is used by the testing suite only and is fairly inefficient. This is the Core-only select() that will be rendered by a complete compilation of this query, and is what .statement used to return in 1.3
(self, legacy_query_style: bool = True)
| 537 | return stmt |
| 538 | |
| 539 | def _final_statement(self, legacy_query_style: bool = True) -> Select[Any]: |
| 540 | """Return the 'final' SELECT statement for this :class:`.Query`. |
| 541 | |
| 542 | This is used by the testing suite only and is fairly inefficient. |
| 543 | |
| 544 | This is the Core-only select() that will be rendered by a complete |
| 545 | compilation of this query, and is what .statement used to return |
| 546 | in 1.3. |
| 547 | |
| 548 | |
| 549 | """ |
| 550 | |
| 551 | q = self._clone() |
| 552 | |
| 553 | return q._compile_state( |
| 554 | use_legacy_query_style=legacy_query_style |
| 555 | ).statement # type: ignore |
| 556 | |
| 557 | def _statement_20( |
| 558 | self, for_statement: bool = False, use_legacy_query_style: bool = True |