1
0
mirror of https://github.com/django/django.git synced 2025-04-04 21:46:40 +00:00

Used Query.is_sliced in SQLCompiler.as_sql().

This commit is contained in:
Simon Charette 2022-10-28 08:45:28 +02:00 committed by Mariusz Felisiak
parent de2c2127b6
commit 09397f5cfa

View File

@ -716,9 +716,7 @@ class SQLCompiler:
)
for_update_part = None
# Is a LIMIT/OFFSET clause needed?
with_limit_offset = with_limits and (
self.query.high_mark is not None or self.query.low_mark
)
with_limit_offset = with_limits and self.query.is_sliced
combinator = self.query.combinator
features = self.connection.features
if combinator: