mirror of https://github.com/django/django.git
Moved standard SQL for savepoints in the base backend.
These methods are only called when uses_savepoints = True anyway.
This commit is contained in:
parent
3bdc7a6a70
commit
918f44e3ae
|
@ -863,19 +863,19 @@ class BaseDatabaseOperations(object):
|
|||
"uses_savepoints" feature is True. The "sid" parameter is a string
|
||||
for the savepoint id.
|
||||
"""
|
||||
raise NotImplementedError
|
||||
return "SAVEPOINT %s" % self.quote_name(sid)
|
||||
|
||||
def savepoint_commit_sql(self, sid):
|
||||
"""
|
||||
Returns the SQL for committing the given savepoint.
|
||||
"""
|
||||
raise NotImplementedError
|
||||
return "RELEASE SAVEPOINT %s" % self.quote_name(sid)
|
||||
|
||||
def savepoint_rollback_sql(self, sid):
|
||||
"""
|
||||
Returns the SQL for rolling back the given savepoint.
|
||||
"""
|
||||
raise NotImplementedError
|
||||
return "ROLLBACK TO SAVEPOINT %s" % self.quote_name(sid)
|
||||
|
||||
def set_time_zone_sql(self):
|
||||
"""
|
||||
|
|
|
@ -355,15 +355,6 @@ class DatabaseOperations(BaseDatabaseOperations):
|
|||
items_sql = "(%s)" % ", ".join(["%s"] * len(fields))
|
||||
return "VALUES " + ", ".join([items_sql] * num_values)
|
||||
|
||||
def savepoint_create_sql(self, sid):
|
||||
return "SAVEPOINT %s" % sid
|
||||
|
||||
def savepoint_commit_sql(self, sid):
|
||||
return "RELEASE SAVEPOINT %s" % sid
|
||||
|
||||
def savepoint_rollback_sql(self, sid):
|
||||
return "ROLLBACK TO SAVEPOINT %s" % sid
|
||||
|
||||
class DatabaseWrapper(BaseDatabaseWrapper):
|
||||
vendor = 'mysql'
|
||||
operators = {
|
||||
|
|
|
@ -175,15 +175,6 @@ class DatabaseOperations(BaseDatabaseOperations):
|
|||
style.SQL_TABLE(qn(f.m2m_db_table()))))
|
||||
return output
|
||||
|
||||
def savepoint_create_sql(self, sid):
|
||||
return "SAVEPOINT %s" % sid
|
||||
|
||||
def savepoint_commit_sql(self, sid):
|
||||
return "RELEASE SAVEPOINT %s" % sid
|
||||
|
||||
def savepoint_rollback_sql(self, sid):
|
||||
return "ROLLBACK TO SAVEPOINT %s" % sid
|
||||
|
||||
def prep_for_iexact_query(self, x):
|
||||
return x
|
||||
|
||||
|
|
Loading…
Reference in New Issue