Kaydet (Commit) 60483893 authored tarafından Malcolm Tredinnick's avatar Malcolm Tredinnick

Fixed #7532 -- Removed some dead code from the db backends. Thanks, Ramiro.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7852 bcc190cf-cafb-0310-a4f2-bffc1f526a37
üst 5deb4fcb
......@@ -161,16 +161,6 @@ class BaseDatabaseOperations(object):
"""
return cursor.lastrowid
def limit_offset_sql(self, limit, offset=None):
"""
Returns a LIMIT/OFFSET SQL clause, given a limit and optional offset.
"""
# 'LIMIT 40 OFFSET 20'
sql = "LIMIT %s" % limit
if offset and offset != 0:
sql += " OFFSET %s" % offset
return sql
def lookup_cast(self, lookup_type):
"""
Returns the string to use in a query when performing lookups
......
......@@ -89,13 +89,6 @@ class DatabaseOperations(BaseDatabaseOperations):
def fulltext_search_sql(self, field_name):
return 'MATCH (%s) AGAINST (%%s IN BOOLEAN MODE)' % field_name
def limit_offset_sql(self, limit, offset=None):
# 'LIMIT 20,40'
sql = "LIMIT "
if offset and offset != 0:
sql += "%s," % offset
return sql + str(limit)
def no_limit_value(self):
# 2**64 - 1, as recommended by the MySQL documentation
return 18446744073709551615L
......
......@@ -93,13 +93,6 @@ class DatabaseOperations(BaseDatabaseOperations):
def fulltext_search_sql(self, field_name):
return 'MATCH (%s) AGAINST (%%s IN BOOLEAN MODE)' % field_name
def limit_offset_sql(self, limit, offset=None):
# 'LIMIT 20,40'
sql = "LIMIT "
if offset and offset != 0:
sql += "%s," % offset
return sql + str(limit)
def no_limit_value(self):
# 2**64 - 1, as recommended by the MySQL documentation
return 18446744073709551615L
......
......@@ -87,11 +87,6 @@ class DatabaseOperations(BaseDatabaseOperations):
cursor.execute('SELECT %s_sq.currval FROM dual' % sq_name)
return cursor.fetchone()[0]
def limit_offset_sql(self, limit, offset=None):
# Limits and offset are too complicated to be handled here.
# Instead, they are handled in django/db/backends/oracle/query.py.
return ""
def lookup_cast(self, lookup_type):
if lookup_type in ('iexact', 'icontains', 'istartswith', 'iendswith'):
return "UPPER(%s)"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment