equal
deleted
inserted
replaced
513 entity.cw_set_relation_cache(attr, role, rrset) |
513 entity.cw_set_relation_cache(attr, role, rrset) |
514 return entity |
514 return entity |
515 |
515 |
516 @cached |
516 @cached |
517 def syntax_tree(self): |
517 def syntax_tree(self): |
518 """get the syntax tree for the source query. |
518 """return the syntax tree (:class:`rql.stmts.Union`) for the originating |
519 |
519 query. You can expect it to have solutions computed but it won't be |
520 :rtype: rql.stmts.Statement |
520 annotated (you usually don't need that for simple introspection). |
521 :return: the RQL syntax tree of the originating query |
|
522 """ |
521 """ |
523 if self._rqlst: |
522 if self._rqlst: |
524 rqlst = self._rqlst.copy() |
523 rqlst = self._rqlst.copy() |
525 # to avoid transport overhead when pyro is used, the schema has been |
524 # to avoid transport overhead when pyro is used, the schema has been |
526 # unset from the syntax tree |
525 # unset from the syntax tree |
527 rqlst.schema = self.req.vreg.schema |
526 rqlst.schema = self.req.vreg.schema |
528 self.req.vreg.rqlhelper.annotate(rqlst) |
|
529 else: |
527 else: |
530 rqlst = self.req.vreg.parse(self.req, self.rql, self.args) |
528 rqlst = self.req.vreg.parse(self.req, self.rql, self.args) |
531 return rqlst |
529 return rqlst |
532 |
530 |
533 @cached |
531 @cached |