mirror of https://github.com/django/django.git
Simplified Oracle's DatabaseOperations.cache_key_culling_sql() with LIMIT/OFFSET.
This commit is contained in:
parent
fdc936c913
commit
e0a3cfaca0
|
@ -56,11 +56,7 @@ END;
|
||||||
}
|
}
|
||||||
|
|
||||||
def cache_key_culling_sql(self):
|
def cache_key_culling_sql(self):
|
||||||
return """
|
return 'SELECT cache_key FROM %s ORDER BY cache_key OFFSET %%s ROWS FETCH FIRST 1 ROWS ONLY'
|
||||||
SELECT cache_key
|
|
||||||
FROM (SELECT cache_key, rank() OVER (ORDER BY cache_key) AS rank FROM %s)
|
|
||||||
WHERE rank = %%s + 1
|
|
||||||
"""
|
|
||||||
|
|
||||||
def date_extract_sql(self, lookup_type, field_name):
|
def date_extract_sql(self, lookup_type, field_name):
|
||||||
if lookup_type == 'week_day':
|
if lookup_type == 'week_day':
|
||||||
|
|
Loading…
Reference in New Issue