git://git.onelab.eu
/
myslice.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
wip metadata
[myslice.git]
/
manifold
/
js
/
manifold-query.js
diff --git
a/manifold/js/manifold-query.js
b/manifold/js/manifold-query.js
index
c6ebaab
..
77925c4
100644
(file)
--- a/
manifold/js/manifold-query.js
+++ b/
manifold/js/manifold-query.js
@@
-99,19
+99,22
@@
INSERT INTO object VALUES(field=value)
return {'added':added, 'removed':removed};
}
return {'added':added, 'removed':removed};
}
+ // Callaback received 3 parameters: query, data, parent_query
this.iter_subqueries = function(callback, data)
{
this.iter_subqueries = function(callback, data)
{
- rec = function(query, callback, data) {
+ rec = function(query, callback, data
, parent_query
) {
jQuery.each(query.subqueries, function(object, subquery) {
jQuery.each(query.subqueries, function(object, subquery) {
- rec(subquery, callback);
+ rec(subquery, callback
, data, query
);
});
});
- callback(query, data);
+ callback(query, data
, parent_query
);
};
};
+
if (this.analyzed_query !== undefined)
query = this.analyzed_query;
else
if (this.analyzed_query !== undefined)
query = this.analyzed_query;
else
- query = this
- rec(query, callback, data);
+ query = this;
+
+ rec(query, callback, data, null);
}
// we send queries as a json string now
}
// we send queries as a json string now