server/session.py
changeset 8306 4da49700b06a
parent 8265 9747ab9230ad
child 8367 fc59d2380c48
equal deleted inserted replaced
8299:e5d636081571 8306:4da49700b06a
   254         self.default_mode = 'read'
   254         self.default_mode = 'read'
   255         # undo support
   255         # undo support
   256         if repo.config.creating or repo.config.repairing or self.is_internal_session:
   256         if repo.config.creating or repo.config.repairing or self.is_internal_session:
   257             self.undo_actions = False
   257             self.undo_actions = False
   258         else:
   258         else:
   259             self.undo_actions = repo.config['undo-support']
   259             self.undo_actions = repo.config['undo-enabled']
   260         # short cut to querier .execute method
   260         # short cut to querier .execute method
   261         self._execute = repo.querier.execute
   261         self._execute = repo.querier.execute
   262         # shared data, used to communicate extra information between the client
   262         # shared data, used to communicate extra information between the client
   263         # and the rql server
   263         # and the rql server
   264         self.data = {}
   264         self.data = {}
   886 
   886 
   887     def describe(self, eid, asdict=False):
   887     def describe(self, eid, asdict=False):
   888         """return a tuple (type, sourceuri, extid) for the entity with id <eid>"""
   888         """return a tuple (type, sourceuri, extid) for the entity with id <eid>"""
   889         metas = self.repo.type_and_source_from_eid(eid, self)
   889         metas = self.repo.type_and_source_from_eid(eid, self)
   890         if asdict:
   890         if asdict:
   891             return dict(zip(('type', 'source', 'extid', 'asource'), metas)) 
   891             return dict(zip(('type', 'source', 'extid', 'asource'), metas))
   892        # XXX :-1 for cw compat, use asdict=True for full information
   892        # XXX :-1 for cw compat, use asdict=True for full information
   893         return metas[:-1]
   893         return metas[:-1]
   894 
   894 
   895     # db-api like interface ###################################################
   895     # db-api like interface ###################################################
   896 
   896