equal
deleted
inserted
replaced
1029 if mode == 'transaction': |
1029 if mode == 'transaction': |
1030 self.default_mode = 'transaction' |
1030 self.default_mode = 'transaction' |
1031 else: # mode == 'write' |
1031 else: # mode == 'write' |
1032 self.default_mode = 'read' |
1032 self.default_mode = 'read' |
1033 |
1033 |
1034 def get_mode(self): |
1034 mode = tx_attr('mode', writable=True) |
1035 return self._tx.mode |
|
1036 def set_mode(self, value): |
|
1037 self._tx.mode = value |
|
1038 mode = property(get_mode, set_mode, |
|
1039 doc='transaction mode (read/write/transaction), resetted to' |
|
1040 ' default_mode on commit / rollback') |
|
1041 |
|
1042 commit_state = tx_attr('commit_state', writable=True) |
1035 commit_state = tx_attr('commit_state', writable=True) |
1043 |
1036 |
1044 @property |
1037 @property |
1045 def cnxset(self): |
1038 def cnxset(self): |
1046 """connections set, set according to transaction mode for each query""" |
1039 """connections set, set according to transaction mode for each query""" |