Applies a SQL syntax extension to this statement. .. seealso:: :ref:`examples_syntax_extensions` :func:`_mysql.limit` - DML LIMIT for MySQL :func:`_postgresql.distinct_on` - DISTINCT ON for PostgreSQL .. versionadded:: 2.1
(self, extension: SyntaxExtension)
| 2725 | |
| 2726 | @_generative |
| 2727 | def ext(self, extension: SyntaxExtension) -> Self: |
| 2728 | """Applies a SQL syntax extension to this statement. |
| 2729 | |
| 2730 | .. seealso:: |
| 2731 | |
| 2732 | :ref:`examples_syntax_extensions` |
| 2733 | |
| 2734 | :func:`_mysql.limit` - DML LIMIT for MySQL |
| 2735 | |
| 2736 | :func:`_postgresql.distinct_on` - DISTINCT ON for PostgreSQL |
| 2737 | |
| 2738 | .. versionadded:: 2.1 |
| 2739 | |
| 2740 | """ |
| 2741 | |
| 2742 | extension = coercions.expect(roles.SyntaxExtensionRole, extension) |
| 2743 | self._syntax_extensions += (extension,) |
| 2744 | return self |
| 2745 | |
| 2746 | def all(self) -> List[_T]: |
| 2747 | """Return the results represented by this :class:`_query.Query` |
no outgoing calls