rename js Query into ManifoldQuery
authorThierry Parmentelat <thierry.parmentelat@inria.fr>
Sun, 17 Mar 2013 17:19:20 +0000 (18:19 +0100)
committerThierry Parmentelat <thierry.parmentelat@inria.fr>
Sun, 17 Mar 2013 17:19:20 +0000 (18:19 +0100)
engine/js/manifold-query.js [moved from engine/js/query.js with 94% similarity]
engine/manifoldquery.py
plugins/lists/simplelist.py
plugins/querycode/querycode.py

similarity index 94%
rename from engine/js/query.js
rename to engine/js/manifold-query.js
index 183e55d..710f5d9 100644 (file)
@@ -1,4 +1,4 @@
-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;
@@ -40,7 +40,7 @@ INSERT INTO method VALUES(field=value)
 -------------------------------------------------------------*/
     
     this.clone = function() {
-        q = new Query();
+        q = new ManifoldQuery();
         return jQuery.extend(true, q, this);
     }
     this.add_filter = function(key, op, value) {
@@ -101,7 +101,7 @@ INSERT INTO method VALUES(field=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;
@@ -117,7 +117,7 @@ INSERT INTO method VALUES(field=value)
                 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;
@@ -135,7 +135,7 @@ INSERT INTO method VALUES(field=value)
                 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;
@@ -153,7 +153,7 @@ INSERT INTO method VALUES(field=value)
                 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;
index ab09bfe..4ee9c01 100644 (file)
@@ -45,7 +45,7 @@ class ManifoldQuery:
                       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
index 405b2e7..663dd05 100644 (file)
@@ -20,7 +20,7 @@ class SimpleList (Plugin) :
         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",
index 4b84548..6766444 100644 (file)
@@ -13,7 +13,7 @@ class QueryCode (Plugin):
 
     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",