Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

…amiro.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@7852 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 6048389391f61aedf00b168d2d3ccf7a0d55d039 1 parent 5deb4fc
Malcolm Tredinnick malcolmt authored
10 django/db/backends/__init__.py
View
@@ -161,16 +161,6 @@ def last_insert_id(self, cursor, table_name, pk_name):
"""
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
7 django/db/backends/mysql/base.py
View
@@ -89,13 +89,6 @@ def drop_foreignkey_sql(self):
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
7 django/db/backends/mysql_old/base.py
View
@@ -93,13 +93,6 @@ def drop_foreignkey_sql(self):
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
5 django/db/backends/oracle/base.py
View
@@ -87,11 +87,6 @@ def last_insert_id(self, cursor, table_name, pk_name):
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)"
Please sign in to comment.
Something went wrong with that request. Please try again.