X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=manifold%2Fjs%2Fmanifold.js;h=b2df24ba6a3f08afda8403814737950373e1768c;hb=0f95c8fe41bff140a98c693cc1ec7be669820d94;hp=bd34726ecee9e40d7436f724bb3579405bc69e8e;hpb=52089da7b7878734cc5f5c26e188909c5ee25b39;p=unfold.git diff --git a/manifold/js/manifold.js b/manifold/js/manifold.js index bd34726e..b2df24ba 100644 --- a/manifold/js/manifold.js +++ b/manifold/js/manifold.js @@ -818,6 +818,21 @@ var manifold = { manifold.raise_record_event(query_uuid, event_type, value); // b) subqueries eventually (dot in the key) + // Let's unfold + var path_array = value.key.split('.'); + var value_key = value.key.split('.'); + + var cur_query = query; + if (cur_query.analyzed_query) + cur_query = cur_query.analyzed_query; + $.each(path_array, function(i, method) { + cur_query = cur_query.subqueries[method]; + value_key.shift(); // XXX check that method is indeed shifted + }); + value.key = value_key; + + manifold.raise_record_event(cur_query.query_uuid, event_type, value); + // XXX make this DOT a global variable... could be '/' break;