--- a/cubicweb/server/querier.py Wed Mar 13 10:40:05 2019 +0100
+++ b/cubicweb/server/querier.py Wed Mar 13 11:02:39 2019 +0100
@@ -211,7 +211,7 @@
noinvariant = ()
if cached is None:
self.cnx.vreg.rqlhelper.simplify(union)
- self.querier.rqlannotator.annotate(union)
+ RQLAnnotator(self.querier.schema).annotate(union)
set_qdata(self.querier.schema.rschema, union, noinvariant)
if union.has_text_query:
self.cache_key = None
@@ -475,8 +475,6 @@
self.clear_caches()
# rql planner
self._planner = SSPlanner(schema, self._repo.vreg.rqlhelper)
- # sql generation annotator
- self.rqlannotator = RQLAnnotator(schema)
def clear_caches(self, eids=None, etypes=None):
if eids is None:
@@ -562,7 +560,6 @@
}
start = time.time()
-
# execute the plan
try:
results = plan.execute()
--- a/cubicweb/server/sources/native.py Wed Mar 13 10:40:05 2019 +0100
+++ b/cubicweb/server/sources/native.py Wed Mar 13 11:02:39 2019 +0100
@@ -48,7 +48,7 @@
from cubicweb.server import schema2sql as y2sql
from cubicweb.server.utils import crypt_password, verify_and_update
from cubicweb.server.sqlutils import SQL_PREFIX, SQLAdapterMixIn
-from cubicweb.server.rqlannotation import set_qdata
+from cubicweb.server.rqlannotation import RQLAnnotator, set_qdata
from cubicweb.server.hook import CleanupDeletedEidsCacheOp
from cubicweb.server.edition import EditedEntity
from cubicweb.server.sources import AbstractSource, dbg_st_search, dbg_results, rql2sql
@@ -472,7 +472,7 @@
rqlst = self.repo.vreg.rqlhelper.parse(rql)
rqlst.restricted_vars = ()
rqlst.children[0].solutions = sols
- self.repo.querier.rqlannotator.annotate(rqlst)
+ RQLAnnotator(self.repo.querier.schema).annotate(rqlst)
set_qdata(self.schema.rschema, rqlst, ())
return rqlst