Loading django/db/backends/__init__.py +1 −0 Original line number Diff line number Diff line Loading @@ -497,6 +497,7 @@ class BaseDatabaseFeatures(object): can_return_id_from_insert = False has_bulk_insert = False uses_savepoints = False can_release_savepoints = False can_combine_inserts_with_and_without_auto_increment_pk = False # If True, don't use integer foreign keys referring to, e.g., positive Loading django/db/backends/mysql/base.py +1 −0 Original line number Diff line number Diff line Loading @@ -182,6 +182,7 @@ class DatabaseFeatures(BaseDatabaseFeatures): requires_explicit_null_ordering_when_grouping = True allows_auto_pk_0 = False uses_savepoints = True can_release_savepoints = True atomic_transactions = False supports_column_check_constraints = False Loading django/db/backends/postgresql_psycopg2/base.py +1 −0 Original line number Diff line number Diff line Loading @@ -50,6 +50,7 @@ class DatabaseFeatures(BaseDatabaseFeatures): has_select_for_update_nowait = True has_bulk_insert = True uses_savepoints = True can_release_savepoints = True supports_tablespaces = True supports_transactions = True can_introspect_ip_address_field = True Loading django/db/backends/sqlite3/base.py +4 −0 Original line number Diff line number Diff line Loading @@ -118,6 +118,10 @@ class DatabaseFeatures(BaseDatabaseFeatures): def uses_savepoints(self): return Database.sqlite_version_info >= (3, 6, 8) @cached_property def can_release_savepoints(self): return self.uses_savepoints @cached_property def supports_stddev(self): """Confirm support for STDDEV and related stats functions Loading django/db/transaction.py +6 −0 Original line number Diff line number Diff line Loading @@ -219,6 +219,9 @@ class Atomic(object): except DatabaseError: try: connection.savepoint_rollback(sid) # The savepoint won't be reused. Release it to # minimize overhead for the database server. connection.savepoint_commit(sid) except Error: # If rolling back to a savepoint fails, mark for # rollback at a higher level and avoid shadowing Loading Loading @@ -249,6 +252,9 @@ class Atomic(object): else: try: connection.savepoint_rollback(sid) # The savepoint won't be reused. Release it to # minimize overhead for the database server. connection.savepoint_commit(sid) except Error: # If rolling back to a savepoint fails, mark for # rollback at a higher level and avoid shadowing Loading Loading
django/db/backends/__init__.py +1 −0 Original line number Diff line number Diff line Loading @@ -497,6 +497,7 @@ class BaseDatabaseFeatures(object): can_return_id_from_insert = False has_bulk_insert = False uses_savepoints = False can_release_savepoints = False can_combine_inserts_with_and_without_auto_increment_pk = False # If True, don't use integer foreign keys referring to, e.g., positive Loading
django/db/backends/mysql/base.py +1 −0 Original line number Diff line number Diff line Loading @@ -182,6 +182,7 @@ class DatabaseFeatures(BaseDatabaseFeatures): requires_explicit_null_ordering_when_grouping = True allows_auto_pk_0 = False uses_savepoints = True can_release_savepoints = True atomic_transactions = False supports_column_check_constraints = False Loading
django/db/backends/postgresql_psycopg2/base.py +1 −0 Original line number Diff line number Diff line Loading @@ -50,6 +50,7 @@ class DatabaseFeatures(BaseDatabaseFeatures): has_select_for_update_nowait = True has_bulk_insert = True uses_savepoints = True can_release_savepoints = True supports_tablespaces = True supports_transactions = True can_introspect_ip_address_field = True Loading
django/db/backends/sqlite3/base.py +4 −0 Original line number Diff line number Diff line Loading @@ -118,6 +118,10 @@ class DatabaseFeatures(BaseDatabaseFeatures): def uses_savepoints(self): return Database.sqlite_version_info >= (3, 6, 8) @cached_property def can_release_savepoints(self): return self.uses_savepoints @cached_property def supports_stddev(self): """Confirm support for STDDEV and related stats functions Loading
django/db/transaction.py +6 −0 Original line number Diff line number Diff line Loading @@ -219,6 +219,9 @@ class Atomic(object): except DatabaseError: try: connection.savepoint_rollback(sid) # The savepoint won't be reused. Release it to # minimize overhead for the database server. connection.savepoint_commit(sid) except Error: # If rolling back to a savepoint fails, mark for # rollback at a higher level and avoid shadowing Loading Loading @@ -249,6 +252,9 @@ class Atomic(object): else: try: connection.savepoint_rollback(sid) # The savepoint won't be reused. Release it to # minimize overhead for the database server. connection.savepoint_commit(sid) except Error: # If rolling back to a savepoint fails, mark for # rollback at a higher level and avoid shadowing Loading