mirror of https://github.com/django/django.git
Fixed #15293 -- Updated the dummy backend to support the APIs introduced by r15493. Thanks to mp for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15528 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
7e46b17000
commit
756f1c218d
|
@ -35,26 +35,32 @@ class DatabaseIntrospection(BaseDatabaseIntrospection):
|
||||||
get_relations = complain
|
get_relations = complain
|
||||||
get_indexes = complain
|
get_indexes = complain
|
||||||
|
|
||||||
class DatabaseWrapper(object):
|
class DatabaseWrapper(BaseDatabaseWrapper):
|
||||||
operators = {}
|
operators = {}
|
||||||
cursor = complain
|
# Override the base class implementations with null
|
||||||
|
# implementations. Anything that tries to actually
|
||||||
|
# do something raises complain; anything that tries
|
||||||
|
# to rollback or undo something raises ignore.
|
||||||
_commit = complain
|
_commit = complain
|
||||||
_rollback = ignore
|
_rollback = ignore
|
||||||
|
enter_transaction_management = complain
|
||||||
|
leave_transaction_management = ignore
|
||||||
|
set_dirty = complain
|
||||||
|
set_clean = complain
|
||||||
|
commit_unless_managed = complain
|
||||||
|
rollback_unless_managed = ignore
|
||||||
|
savepoint = ignore
|
||||||
|
savepoint_commit = complain
|
||||||
|
savepoint_rollback = ignore
|
||||||
|
close = ignore
|
||||||
|
cursor = complain
|
||||||
|
|
||||||
|
def __init__(self, *args, **kwargs):
|
||||||
|
super(DatabaseWrapper, self).__init__(*args, **kwargs)
|
||||||
|
|
||||||
def __init__(self, settings_dict, alias, *args, **kwargs):
|
|
||||||
self.features = BaseDatabaseFeatures(self)
|
self.features = BaseDatabaseFeatures(self)
|
||||||
self.ops = DatabaseOperations()
|
self.ops = DatabaseOperations()
|
||||||
self.client = DatabaseClient(self)
|
self.client = DatabaseClient(self)
|
||||||
self.creation = BaseDatabaseCreation(self)
|
self.creation = BaseDatabaseCreation(self)
|
||||||
self.introspection = DatabaseIntrospection(self)
|
self.introspection = DatabaseIntrospection(self)
|
||||||
self.validation = BaseDatabaseValidation(self)
|
self.validation = BaseDatabaseValidation(self)
|
||||||
|
|
||||||
self.settings_dict = settings_dict
|
|
||||||
self.alias = alias
|
|
||||||
|
|
||||||
self.transaction_state = []
|
|
||||||
self.savepoint_state = 0
|
|
||||||
self.dirty = None
|
|
||||||
|
|
||||||
def close(self):
|
|
||||||
pass
|
|
||||||
|
|
Loading…
Reference in New Issue