cubicweb/server/sources/native.py
changeset 12756 d91c229de97f
parent 12739 c6f8ca03718f
child 12758 db95a417a5ec
--- a/cubicweb/server/sources/native.py	Thu Aug 01 02:51:52 2019 +0200
+++ b/cubicweb/server/sources/native.py	Thu Aug 01 05:42:45 2019 +0200
@@ -499,7 +499,7 @@
                 continue
         raise AuthenticationError()
 
-    def syntax_tree_search(self, cnx, union, args=None, cachekey=None):
+    def syntax_tree_search(self, cnx, union, args=None, cachekey=None, rql_query_tracing_token=None):
         """return result from this source for a rql query (actually from
         a rql syntax tree and a solution dictionary mapping each used
         variable to a possible type). If cachekey is given, the query
@@ -523,7 +523,7 @@
                 self._cache[cachekey] = sql, qargs, cbs
         args = self.merge_args(args, qargs)
         assert isinstance(sql, str), repr(sql)
-        cursor = cnx.system_sql(sql, args)
+        cursor = cnx.system_sql(sql, args, rql_query_tracing_token=rql_query_tracing_token)
         results = self.process_result(cursor, cnx, cbs)
         assert dbg_results(results)
         return results
@@ -680,7 +680,7 @@
         self.doexec(cnx, sql, attrs)
 
     @statsd_timeit
-    def doexec(self, cnx, query, args=None, rollback=True):
+    def doexec(self, cnx, query, args=None, rollback=True, rql_query_tracing_token=None):
         """Execute a query.
         it's a function just so that it shows up in profiling
         """