Apply a ``LIMIT`` to the query and return the newly resulting ``Query``. .. seealso:: :meth:`_sql.Select.limit` - v2 equivalent method.
(self, limit: _LimitOffsetType)
| 2618 | @_generative |
| 2619 | @_assertions(_no_statement_condition) |
| 2620 | def limit(self, limit: _LimitOffsetType) -> Self: |
| 2621 | """Apply a ``LIMIT`` to the query and return the newly resulting |
| 2622 | ``Query``. |
| 2623 | |
| 2624 | .. seealso:: |
| 2625 | |
| 2626 | :meth:`_sql.Select.limit` - v2 equivalent method. |
| 2627 | |
| 2628 | """ |
| 2629 | self._limit_clause = sql_util._offset_or_limit_clause(limit) |
| 2630 | return self |
| 2631 | |
| 2632 | @_generative |
| 2633 | @_assertions(_no_statement_condition) |