Skip to content

Commit 4d68a59

Browse files
committed
[WOQL.js] Take out debug check.
1 parent e705dbd commit 4d68a59

File tree

1 file changed

+15
-16
lines changed

1 file changed

+15
-16
lines changed

lib/woql.js

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,15 @@ WOQL.greater = function(v1, v2){ return new WOQLQuery().greater(v1, v2); }
5656

5757

5858
/* Mathematical Processing */
59-
WOQL.eval = function(arith, v){ return new WOQLQuery().eval(arith, v);}
59+
WOQL.eval = function(arith, v){ return new WOQLQuery().eval(arith, v);}
6060
WOQL.plus = function(...args){ return new WOQLQuery().plus(...args);}
6161
WOQL.minus = function(...args){ return new WOQLQuery().minus(...args); }
6262
WOQL.times = function(...args){ return new WOQLQuery().times(...args); }
6363
WOQL.divide = function(...args){ return new WOQLQuery().divide(...args); }
6464
WOQL.exp = function(a, b){ return new WOQLQuery().exp(a, b); }
6565
WOQL.div = function(...args){ return new WOQLQuery().div(...args); }
6666
WOQL.comment = function(arg){ return new WOQLQuery().comment(arg); }
67-
WOQL.length = function(var1, res){ return new WOQLQuery().length(var1, res);}
67+
WOQL.length = function(var1, res){ return new WOQLQuery().length(var1, res);}
6868

6969

7070
//language extensions that can be chained after 'grounded' stuff (clauses with a specific subject) sub, isa, delete_triple, add_triple, delete_quad, add_quad, node
@@ -123,7 +123,7 @@ WOQLQuery.prototype.get = function(arr1, arr2, target){
123123
target = arr2;
124124
}
125125
else {
126-
var map = this.buildAsClauses(arr1, arr2);
126+
var map = this.buildAsClauses(arr1, arr2);
127127
}
128128
if(target){
129129
if(target.json) target = target.json();
@@ -194,7 +194,7 @@ WOQLQuery.prototype.group_by = function(gvarlist, groupedvar, groupquery, output
194194
if(typeof groupedvar == "object" && Array.isArray(groupedvar)){
195195
ng = [];
196196
for(var i = 0; i<groupedvar.length; i++){
197-
ng.push(groupedvar[i].substring(0, 2) != "v:" ? "v:" + groupedvar[i] : groupedvar[i]);
197+
ng.push(groupedvar[i].substring(0, 2) != "v:" ? "v:" + groupedvar[i] : groupedvar[i]);
198198
}
199199
groupedvar = {"list": ng};
200200
}
@@ -203,7 +203,7 @@ WOQLQuery.prototype.group_by = function(gvarlist, groupedvar, groupquery, output
203203
}
204204
args.push(groupedvar);
205205
if(output){
206-
groupquery = groupquery.json ? groupquery.json() : groupquery;
206+
groupquery = groupquery.json ? groupquery.json() : groupquery;
207207
args.push(groupquery);
208208
}
209209
else {
@@ -522,7 +522,7 @@ WOQLQuery.prototype.eval = function(arith, v){
522522
}
523523

524524
WOQLQuery.prototype.plus = function (...args) {
525-
this.cursor.plus = [];
525+
this.cursor.plus = [];
526526
for(var i = 0; i < args.length; i++){
527527
this.cursor.plus.push(args[i].json ? args[i].json() : args[i]);
528528
}
@@ -669,7 +669,7 @@ WOQLQuery.prototype.as = function(a, b){
669669
b = (b.indexOf(":") == -1 ? "v:" + b : b);
670670
var val = (typeof a == "object" ? a : { "@value" : a});
671671
this.query.push({as: [val, b]});
672-
return this;
672+
return this;
673673
}
674674

675675
/**
@@ -1217,7 +1217,7 @@ WOQLQuery.prototype.prettyPrint = function(indent, show_context, q, fluent){
12171217
str += this.getWOQLPrelude(operator, fluent, indent - this.indent);
12181218
var val = q[operator];
12191219
if(this.chainable(operator, val[val.length-1])){
1220-
//all arguments up until the last are regular function arguments
1220+
//all arguments up until the last are regular function arguments
12211221
str += this.uncleanArguments(operator, val.slice(0, val.length-1), indent, show_context);
12221222
if(newlining_operators.indexOf(operator) !== -1){
12231223
//some fluent function calls demand a linebreak..
@@ -1248,7 +1248,7 @@ WOQLQuery.prototype.getWOQLPrelude = function(operator, fluent, inline){
12481248
if(fluent){
12491249
return "." + operator;
12501250
}
1251-
return (inline ? "\n" + nspaces(inline) : "") + "WOQL." + operator;
1251+
return (inline ? "\n" + nspaces(inline) : "") + "WOQL." + operator;
12521252
}
12531253

12541254
/**
@@ -1296,7 +1296,7 @@ WOQLQuery.prototype.uncleanArguments = function(operator, args, indent, show_con
12961296
str += ")";
12971297
str += "\n" + nspaces(indent);
12981298
}
1299-
}
1299+
}
13001300
else {
13011301
str += this.uncleanArgument(operator, args[i], i, args);
13021302
}
@@ -1314,10 +1314,10 @@ WOQLQuery.prototype.uncleanArguments = function(operator, args, indent, show_con
13141314
/**
13151315
* Passed as arguments: 1) the operator (and, triple, not, opt, etc)
13161316
* 2) the value of the argument
1317-
* 3) the index (position) of the argument.
1317+
* 3) the index (position) of the argument.
13181318
*/
13191319
WOQLQuery.prototype.uncleanArgument = function(operator, val, index, allArgs){
1320-
//numeric values go out untouched...
1320+
//numeric values go out untouched...
13211321
const numeric_operators = ["limit", "start", "eval", "plus", "minus", "times", "divide", "exp", "div"];
13221322
if(operator == "isa"){
13231323
val = (index == 0 ? this.unclean(val, 'subject') : this.unclean(val, 'class'));
@@ -1516,18 +1516,17 @@ TripleBuilder.prototype.addPO = function(p, o, g){
15161516
else var ttype = "triple";
15171517
var evstr = ttype + '("' + this.subject + '", "' + p + '", ';
15181518
if(typeof o == "string"){
1519-
evstr += "'" + o + "'";
1520-
}
1519+
evstr += "'" + o + "'";
1520+
}
15211521
else if(typeof o == "object"){
1522-
console.log(JSON.stringify(o));
15231522
evstr += JSON.stringify(o);
15241523
}
15251524
else {
15261525
evstr += o;
15271526
}
15281527
if(ttype.substring(ttype.length-4) == "quad" || this.g){
15291528
var g = (g ? g : (this.g ? this.g : "db:schema"));
1530-
evstr += ', "' + g + '"';
1529+
evstr += ', "' + g + '"';
15311530
}
15321531
evstr += ")";
15331532
try {

0 commit comments

Comments
 (0)