server/session.py
changeset 8811 1b7b4709c0cf
parent 8810 1a25bdd49f9a
child 8812 52af67a2f0a5
equal deleted inserted replaced
8810:1a25bdd49f9a 8811:1b7b4709c0cf
  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"""