framework now supports displaying the results of queries
[myslice.git] / manifold / js / manifold-query.js
index 1dcd56c..6036c38 100644 (file)
@@ -45,6 +45,7 @@ INSERT INTO object VALUES(field=value)
         q = new ManifoldQuery();
         return jQuery.extend(true, q, this);
     }
+
     this.add_filter = function(key, op, value) {
         this.filters.push(new Array(key, op, value));
     }
@@ -103,10 +104,10 @@ INSERT INTO object VALUES(field=value)
     this.iter_subqueries = function(callback, data)
     {
         rec = function(query, callback, data, parent_query) {
+            callback(query, data, parent_query);
             jQuery.each(query.subqueries, function(object, subquery) {
                 rec(subquery, callback, data, query);
             });
-            callback(query, data, parent_query);
         };
 
         if (this.analyzed_query !== undefined)