equal
deleted
inserted
replaced
129 self.id = _id or make_uid(user.login.encode('UTF8')) |
129 self.id = _id or make_uid(user.login.encode('UTF8')) |
130 cnxprops = cnxprops or ConnectionProperties('inmemory') |
130 cnxprops = cnxprops or ConnectionProperties('inmemory') |
131 self.user = user |
131 self.user = user |
132 self.repo = repo |
132 self.repo = repo |
133 self.cnxtype = cnxprops.cnxtype |
133 self.cnxtype = cnxprops.cnxtype |
134 self.creation = time() |
134 self.timestamp = time() |
135 self.timestamp = self.creation |
|
136 self.default_mode = 'read' |
135 self.default_mode = 'read' |
137 # support undo for Create Update Delete entity / Add Remove relation |
136 # support undo for Create Update Delete entity / Add Remove relation |
138 if repo.config.creating or repo.config.repairing or self.is_internal_session: |
137 if repo.config.creating or repo.config.repairing or self.is_internal_session: |
139 self.undo_actions = () |
138 self.undo_actions = () |
140 else: |
139 else: |
649 See :meth:`cubicweb.dbapi.Cursor.execute` documentation. |
648 See :meth:`cubicweb.dbapi.Cursor.execute` documentation. |
650 """ |
649 """ |
651 if eid_key is not None: |
650 if eid_key is not None: |
652 warn('[3.8] eid_key is deprecated, you can safely remove this argument', |
651 warn('[3.8] eid_key is deprecated, you can safely remove this argument', |
653 DeprecationWarning, stacklevel=2) |
652 DeprecationWarning, stacklevel=2) |
|
653 self.timestamp = time() # update timestamp |
654 rset = self._execute(self, rql, kwargs, build_descr) |
654 rset = self._execute(self, rql, kwargs, build_descr) |
655 rset.req = self |
655 rset.req = self |
656 return rset |
656 return rset |
657 |
657 |
658 def _clear_thread_data(self): |
658 def _clear_thread_data(self): |