609 |
609 |
610 def source_from_eid(self, eid): |
610 def source_from_eid(self, eid): |
611 """return the source where the entity with id <eid> is located""" |
611 """return the source where the entity with id <eid> is located""" |
612 return self.repo.source_from_eid(eid, self) |
612 return self.repo.source_from_eid(eid, self) |
613 |
613 |
614 def decorate_rset(self, rset): |
|
615 rset.vreg = self.vreg |
|
616 rset.req = self |
|
617 return rset |
|
618 |
|
619 def execute(self, rql, kwargs=None, eid_key=None, build_descr=True): |
614 def execute(self, rql, kwargs=None, eid_key=None, build_descr=True): |
620 """db-api like method directly linked to the querier execute method""" |
615 """db-api like method directly linked to the querier execute method""" |
621 rset = self._execute(self, rql, kwargs, eid_key, build_descr) |
616 rset = self._execute(self, rql, kwargs, eid_key, build_descr) |
622 return self.decorate_rset(rset) |
617 rset.req = self |
|
618 return rset |
623 |
619 |
624 def _clear_thread_data(self): |
620 def _clear_thread_data(self): |
625 """remove everything from the thread local storage, except pool |
621 """remove everything from the thread local storage, except pool |
626 which is explicitly removed by reset_pool, and mode which is set anyway |
622 which is explicitly removed by reset_pool, and mode which is set anyway |
627 by _touch |
623 by _touch |