summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-07-06 14:26:37 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-07-06 14:26:37 +0000
commit6048389391f61aedf00b168d2d3ccf7a0d55d039 (patch)
tree9a5e94ac5b7a55f69ca1718523654f1a16ba44b2
parent5deb4fcbb9be89f0a1fb8056c379bb4339aa5f43 (diff)
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
-rw-r--r--django/db/backends/__init__.py10
-rw-r--r--django/db/backends/mysql/base.py7
-rw-r--r--django/db/backends/mysql_old/base.py7
-rw-r--r--django/db/backends/oracle/base.py5
4 files changed, 0 insertions, 29 deletions
diff --git a/django/db/backends/__init__.py b/django/db/backends/__init__.py
index 36a2339638..c5a0eb71fa 100644
--- a/django/db/backends/__init__.py
+++ b/django/db/backends/__init__.py
@@ -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
diff --git a/django/db/backends/mysql/base.py b/django/db/backends/mysql/base.py
index 336ad89504..74138a7b11 100644
--- a/django/db/backends/mysql/base.py
+++ b/django/db/backends/mysql/base.py
@@ -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
diff --git a/django/db/backends/mysql_old/base.py b/django/db/backends/mysql_old/base.py
index 48b6b6958a..bbcf748869 100644
--- a/django/db/backends/mysql_old/base.py
+++ b/django/db/backends/mysql_old/base.py
@@ -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
diff --git a/django/db/backends/oracle/base.py b/django/db/backends/oracle/base.py
index 76d5acba97..334b5af96f 100644
--- a/django/db/backends/oracle/base.py
+++ b/django/db/backends/oracle/base.py
@@ -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)"