@@ -57,15 +57,15 @@ WOQL.greater = function(v1, v2){ return new WOQLQuery().greater(v1, v2); }
5757
5858
5959/* Mathematical Processing */
60- WOQL . eval = function ( arith , v ) { return new WOQLQuery ( ) . eval ( arith , v ) ; }
60+ WOQL . eval = function ( arith , v ) { return new WOQLQuery ( ) . eval ( arith , v ) ; }
6161WOQL . plus = function ( ...args ) { return new WOQLQuery ( ) . plus ( ...args ) ; }
6262WOQL . minus = function ( ...args ) { return new WOQLQuery ( ) . minus ( ...args ) ; }
6363WOQL . times = function ( ...args ) { return new WOQLQuery ( ) . times ( ...args ) ; }
6464WOQL . divide = function ( ...args ) { return new WOQLQuery ( ) . divide ( ...args ) ; }
6565WOQL . exp = function ( a , b ) { return new WOQLQuery ( ) . exp ( a , b ) ; }
6666WOQL . div = function ( ...args ) { return new WOQLQuery ( ) . div ( ...args ) ; }
6767WOQL . comment = function ( arg ) { return new WOQLQuery ( ) . comment ( arg ) ; }
68- WOQL . length = function ( var1 , res ) { return new WOQLQuery ( ) . length ( var1 , res ) ; }
68+ WOQL . length = function ( var1 , res ) { return new WOQLQuery ( ) . length ( var1 , res ) ; }
6969
7070
7171//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
@@ -124,7 +124,7 @@ WOQLQuery.prototype.get = function(arr1, arr2, target){
124124 target = arr2 ;
125125 }
126126 else {
127- var map = this . buildAsClauses ( arr1 , arr2 ) ;
127+ var map = this . buildAsClauses ( arr1 , arr2 ) ;
128128 }
129129 if ( target ) {
130130 if ( target . json ) target = target . json ( ) ;
@@ -199,7 +199,7 @@ WOQLQuery.prototype.group_by = function(gvarlist, groupedvar, groupquery, output
199199 if ( typeof groupedvar == "object" && Array . isArray ( groupedvar ) ) {
200200 ng = [ ] ;
201201 for ( var i = 0 ; i < groupedvar . length ; i ++ ) {
202- ng . push ( groupedvar [ i ] . substring ( 0 , 2 ) != "v:" ? "v:" + groupedvar [ i ] : groupedvar [ i ] ) ;
202+ ng . push ( groupedvar [ i ] . substring ( 0 , 2 ) != "v:" ? "v:" + groupedvar [ i ] : groupedvar [ i ] ) ;
203203 }
204204 groupedvar = { "list" : ng } ;
205205 }
@@ -208,7 +208,7 @@ WOQLQuery.prototype.group_by = function(gvarlist, groupedvar, groupquery, output
208208 }
209209 args . push ( groupedvar ) ;
210210 if ( output ) {
211- groupquery = groupquery . json ? groupquery . json ( ) : groupquery ;
211+ groupquery = groupquery . json ? groupquery . json ( ) : groupquery ;
212212 args . push ( groupquery ) ;
213213 }
214214 else {
@@ -527,7 +527,7 @@ WOQLQuery.prototype.eval = function(arith, v){
527527}
528528
529529WOQLQuery . prototype . plus = function ( ...args ) {
530- this . cursor . plus = [ ] ;
530+ this . cursor . plus = [ ] ;
531531 for ( var i = 0 ; i < args . length ; i ++ ) {
532532 this . cursor . plus . push ( args [ i ] . json ? args [ i ] . json ( ) : args [ i ] ) ;
533533 }
@@ -674,7 +674,7 @@ WOQLQuery.prototype.as = function(a, b){
674674 b = ( b . indexOf ( ":" ) == - 1 ? "v:" + b : b ) ;
675675 var val = ( typeof a == "object" ? a : { "@value" : a } ) ;
676676 this . query . push ( { as : [ val , b ] } ) ;
677- return this ;
677+ return this ;
678678}
679679
680680/**
@@ -1222,7 +1222,7 @@ WOQLQuery.prototype.prettyPrint = function(indent, show_context, q, fluent){
12221222 str += this . getWOQLPrelude ( operator , fluent , indent - this . indent ) ;
12231223 var val = q [ operator ] ;
12241224 if ( this . chainable ( operator , val [ val . length - 1 ] ) ) {
1225- //all arguments up until the last are regular function arguments
1225+ //all arguments up until the last are regular function arguments
12261226 str += this . uncleanArguments ( operator , val . slice ( 0 , val . length - 1 ) , indent , show_context ) ;
12271227 if ( newlining_operators . indexOf ( operator ) !== - 1 ) {
12281228 //some fluent function calls demand a linebreak..
@@ -1253,7 +1253,7 @@ WOQLQuery.prototype.getWOQLPrelude = function(operator, fluent, inline){
12531253 if ( fluent ) {
12541254 return "." + operator ;
12551255 }
1256- return ( inline ? "\n" + nspaces ( inline ) : "" ) + "WOQL." + operator ;
1256+ return ( inline ? "\n" + nspaces ( inline ) : "" ) + "WOQL." + operator ;
12571257}
12581258
12591259/**
@@ -1301,7 +1301,7 @@ WOQLQuery.prototype.uncleanArguments = function(operator, args, indent, show_con
13011301 str += ")" ;
13021302 str += "\n" + nspaces ( indent ) ;
13031303 }
1304- }
1304+ }
13051305 else {
13061306 str += this . uncleanArgument ( operator , args [ i ] , i , args ) ;
13071307 }
@@ -1319,10 +1319,10 @@ WOQLQuery.prototype.uncleanArguments = function(operator, args, indent, show_con
13191319/**
13201320 * Passed as arguments: 1) the operator (and, triple, not, opt, etc)
13211321 * 2) the value of the argument
1322- * 3) the index (position) of the argument.
1322+ * 3) the index (position) of the argument.
13231323 */
13241324WOQLQuery . prototype . uncleanArgument = function ( operator , val , index , allArgs ) {
1325- //numeric values go out untouched...
1325+ //numeric values go out untouched...
13261326 const numeric_operators = [ "limit" , "start" , "eval" , "plus" , "minus" , "times" , "divide" , "exp" , "div" ] ;
13271327 if ( operator == "isa" ) {
13281328 val = ( index == 0 ? this . unclean ( val , 'subject' ) : this . unclean ( val , 'class' ) ) ;
@@ -1521,18 +1521,17 @@ TripleBuilder.prototype.addPO = function(p, o, g){
15211521 else var ttype = "triple" ;
15221522 var evstr = ttype + '("' + this . subject + '", "' + p + '", ' ;
15231523 if ( typeof o == "string" ) {
1524- evstr += "'" + o + "'" ;
1525- }
1524+ evstr += "'" + o + "'" ;
1525+ }
15261526 else if ( typeof o == "object" ) {
1527- console . log ( JSON . stringify ( o ) ) ;
15281527 evstr += JSON . stringify ( o ) ;
15291528 }
15301529 else {
15311530 evstr += o ;
15321531 }
15331532 if ( ttype . substring ( ttype . length - 4 ) == "quad" || this . g ) {
15341533 var g = ( g ? g : ( this . g ? this . g : "db:schema" ) ) ;
1535- evstr += ', "' + g + '"' ;
1534+ evstr += ', "' + g + '"' ;
15361535 }
15371536 evstr += ")" ;
15381537 try {
0 commit comments