q = new ManifoldQuery();
return jQuery.extend(true, q, this);
}
+
this.add_filter = function(key, op, value) {
this.filters.push(new Array(key, op, 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)
rec(query, callback, data, null);
}
+ this.select = function(field)
+ {
+ this.fields.push(field);
+ }
+
+ this.unselect = function(field)
+ {
+ this.fields = $.grep(this.fields, function(x) { return x != field; });
+ }
+
// we send queries as a json string now
// this.as_POST = function() {
// return {'action': this.action, 'object': this.object, 'timestamp': this.timestamp,