diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2013-03-03 15:48:52 +0100 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2013-03-11 14:48:54 +0100 |
| commit | cfc114e00ebe2ac16c37af2ccee1ed8e47247b7a (patch) | |
| tree | b002ea68d97ff34d59f8d0e9397f55ca74550469 /django/db/backends/postgresql_psycopg2/base.py | |
| parent | 1617557ae30001cef8a863687d4bcdc28151cd50 (diff) | |
Removed _enter/_leave_transaction_management.
The goal is to make all databases share a common, autocommit-based,
implementation.
Diffstat (limited to 'django/db/backends/postgresql_psycopg2/base.py')
| -rw-r--r-- | django/db/backends/postgresql_psycopg2/base.py | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/django/db/backends/postgresql_psycopg2/base.py b/django/db/backends/postgresql_psycopg2/base.py index 384b38cc58..6ea2dd3099 100644 --- a/django/db/backends/postgresql_psycopg2/base.py +++ b/django/db/backends/postgresql_psycopg2/base.py @@ -164,23 +164,6 @@ class DatabaseWrapper(BaseDatabaseWrapper): finally: self.set_clean() - def _enter_transaction_management(self, managed): - """ - Switch the isolation level when needing transaction support, so that - the same transaction is visible across all the queries. - """ - if managed and self.autocommit: - self.set_autocommit(False) - - def _leave_transaction_management(self, managed): - """ - If the normal operating mode is "autocommit", switch back to that when - leaving transaction management. - """ - if not managed and not self.autocommit: - self.rollback() # Must terminate transaction first. - self.set_autocommit(True) - def _set_isolation_level(self, isolation_level): assert isolation_level in range(1, 5) # Use set_autocommit for level = 0 if self.psycopg2_version >= (2, 4, 2): |
