+var guid = (function() {
+ function s4() {
+ return Math.floor((1 + Math.random()) * 0x10000)
+ .toString(16)
+ .substring(1);
+ }
+ return function() {
+ return s4() + s4() + '-' + s4() + '-' + s4() + '-' +
+ s4() + '-' + s4() + s4() + s4();
+ };
+})();
+
function ManifoldQuery(action, object, timestamp, filters, params, fields, unique, query_uuid, aq, sq) {
// get, update, delete, create
var action;
});
};
- if (this.analyzed_query !== undefined)
+ if (!!this.analyzed_query)
query = this.analyzed_query;
else
query = this;
else
this.unique = unique;
- this.query_uuid = query_uuid;
+ if (typeof unique == "undefined")
+ this.query_uuid = guid();
+ else
+ this.query_uuid = query_uuid;
if (typeof aq == "undefined")
this.analyzed_query = null;