-function Query(action, method, timestamp, filters, params, fields, unique, uuid, aq, sq)
+function ManifoldQuery(action, method, timestamp, filters, params, fields, unique, uuid, aq, sq)
{
// get, update, delete, create
var action;
-------------------------------------------------------------*/
this.clone = function() {
- q = new Query();
+ q = new ManifoldQuery();
return jQuery.extend(true, q, this);
}
this.add_filter = function(key, op, value) {
}
this.analyze_subqueries = function() {
/* adapted from the PHP function in com_tophat/includes/query.php */
- var q = new Query();
+ var q = new ManifoldQuery();
q.uuid = this.uuid;
q.action = this.action;
q.method = this.method;
var method = k.substr(0, pos);
var field = k.substr(pos+1);
if (jQuery.inArray(this.method, q.subqueries) == -1) {
- q.subqueries[this.method] = new Query();
+ q.subqueries[this.method] = new ManifoldQuery();
q.subqueries[this.method].action = this.action;
q.subqueries[this.method].method = this.method;
q.subqueries[this.method].timestamp = this.timestamp;
var method = param.substr(0, pos);
var field = param.substr(pos+1);
if (jQuery.inArray(this.method, q.subqueries) == -1) {
- q.subqueries[this.method] = new Query();
+ q.subqueries[this.method] = new ManifoldQuery();
q.subqueries[this.method].action = this.action;
q.subqueries[this.method].method = this.method;
q.subqueries[this.method].timestamp = this.timestamp;
var method = v.substr(0, pos);
var field = v.substr(pos+1);
if (jQuery.inArray(this.method, q.subqueries) == -1) {
- q.subqueries[this.method] = new Query();
+ q.subqueries[this.method] = new ManifoldQuery();
q.subqueries[this.method].action = this.action;
q.subqueries[this.method].method = this.method;
q.subqueries[this.method].timestamp = this.timestamp;
for (method, subquery) in self.subqueries.iteritems()])
sq="{%s}"%sq
- return """ new Query('%(a)s', '%(m)s', '%(t)s', %(f)s, %(p)s, %(c)s, %(unique)s, '%(uuid)s', %(aq)s, %(sq)s)"""%locals()
+ return """ new ManifoldQuery('%(a)s', '%(m)s', '%(t)s', %(f)s, %(p)s, %(c)s, %(unique)s, '%(uuid)s', %(aq)s, %(sq)s)"""%locals()
# this builds a ManifoldQuery object from a dict as received from javascript through its ajax request
# e.g. here's what I captured from the server's output
return env
def requirements (self):
- reqs = { 'js_files' : [ "js/simplelist.js", "js/plugin.js", "js/query.js", "js/onavail.js",
+ reqs = { 'js_files' : [ "js/simplelist.js", "js/plugin.js", "js/manifold-query.js", "js/onavail.js",
"js/manifold-pubsub.js", "js/manifold-async.js",
"js/spin.presets.js", "js/spin.min.js", "js/jquery.spin.js",
"js/myslice.js",
def requirements (self):
return {
- 'js_files' : [ "js/querycode.js", "js/plugin.js", "js/query.js", "js/onavail.js",
+ 'js_files' : [ "js/querycode.js", "js/plugin.js", "js/manifold-query.js", "js/onavail.js",
"js/manifold-pubsub.js", "js/manifold-async.js",
"js/spin.presets.js", "js/spin.min.js", "js/jquery.spin.js",