Changes between Initial Version and Version 1 of Ticket #24921, comment 10


Ignore:
Timestamp:
Jun 7, 2015, 12:11:08 PM (9 years ago)
Author:
Aymeric Augustin

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #24921, comment 10

    initial v1  
    55For the ORM to function with autocommit off, we should change the `savepoint` parameter of `atomic` to add a third-value, `None` (three-valued booleans, grrr), which would mean "automatic" and be implemented as follows:
    66
     7{{{
    78    if self.savepoint is None:
    89        self.savepoint = not connection.in_atomic_block and not connection.get_autocommit()
     10}}}
    911
    1012In other words, it would mean "no savepoint, unless I'm the outermost atomic block in a connection that is already in a transaction, which means I can't use a plain transaction"
Back to Top