Fixed #26950 -- Removed obsolete DatabaseOperations SQL methods.

Unused as of 2b039d966f.
This commit is contained in:
Anderson Resende 2016-07-27 08:34:44 -03:00 committed by Tim Graham
parent 44a6b40280
commit 0d1218896f
4 changed files with 0 additions and 22 deletions

View File

@ -152,19 +152,6 @@ class BaseDatabaseOperations(object):
else: else:
return 'DISTINCT' return 'DISTINCT'
def drop_foreignkey_sql(self):
"""
Returns the SQL command that drops a foreign key.
"""
return "DROP CONSTRAINT"
def drop_sequence_sql(self, table):
"""
Returns any SQL necessary to drop the sequence for the given table.
Returns None if no SQL is necessary.
"""
return None
def fetch_returned_insert_id(self, cursor): def fetch_returned_insert_id(self, cursor):
""" """
Given a cursor object that has just performed an INSERT...RETURNING Given a cursor object that has just performed an INSERT...RETURNING

View File

@ -97,9 +97,6 @@ class DatabaseOperations(BaseDatabaseOperations):
else: else:
return 'INTERVAL FLOOR(%s / 1000000) SECOND' % sql return 'INTERVAL FLOOR(%s / 1000000) SECOND' % sql
def drop_foreignkey_sql(self):
return "DROP FOREIGN KEY"
def force_no_ordering(self): def force_no_ordering(self):
""" """
"ORDER BY NULL" prevents MySQL from implicitly ordering by grouped "ORDER BY NULL" prevents MySQL from implicitly ordering by grouped

View File

@ -241,9 +241,6 @@ WHEN (new.%(col_name)s IS NULL)
def deferrable_sql(self): def deferrable_sql(self):
return " DEFERRABLE INITIALLY DEFERRED" return " DEFERRABLE INITIALLY DEFERRED"
def drop_sequence_sql(self, table):
return "DROP SEQUENCE %s;" % self.quote_name(self._get_sequence_name(table))
def fetch_returned_insert_id(self, cursor): def fetch_returned_insert_id(self, cursor):
return int(cursor._insert_id_var.getvalue()) return int(cursor._insert_id_var.getvalue())

View File

@ -108,9 +108,6 @@ class DatabaseOperations(BaseDatabaseOperations):
# cause a collision with a field name). # cause a collision with a field name).
return "django_time_extract('%s', %s)" % (lookup_type.lower(), field_name) return "django_time_extract('%s', %s)" % (lookup_type.lower(), field_name)
def drop_foreignkey_sql(self):
return ""
def pk_default_value(self): def pk_default_value(self):
return "NULL" return "NULL"