@@ -29,14 +29,14 @@ const typedef = require('../typedef');
2929
3030// I HAVE TO REVIEW THE Inheritance and the prototype chain
3131class WOQLQuery extends WOQLCore {
32- /**
33- * defines the internal functions of the woql query object - the
34- * language API is defined in WOQLQuery
35- * @module WOQLQuery
36- * @constructor
37- * @param {object } [query] json-ld query for initialisation
38- * @returns {WOQLQuery }
39- */
32+ /**
33+ * defines the internal functions of the woql query object - the
34+ * language API is defined in WOQLQuery
35+ * @module WOQLQuery
36+ * @constructor
37+ * @param {object } [query] json-ld query for initialisation
38+ * @returns {WOQLQuery }
39+ */
4040
4141 /**
4242 * Update a pattern matching rule for the triple (Subject, Predicate, oldObjValue) with the
@@ -373,7 +373,7 @@ WOQLQuery.prototype.and = function (...subqueries) {
373373 const onevar = this . jobj ( subqueries [ i ] ) ;
374374 if (
375375 onevar [ '@type' ] === 'And'
376- && onevar . and
376+ && onevar . and
377377 ) {
378378 for ( let j = 0 ; j < onevar . and . length ; j ++ ) {
379379 const qjson = onevar . and [ j ] ;
@@ -421,16 +421,14 @@ WOQLQuery.prototype.or = function (...subqueries) {
421421 */
422422
423423WOQLQuery . prototype . from = function ( graphRef , query ) {
424- // if (graph && graph === 'args')
425- // return ['graph', 'query']
426424 if ( this . cursor [ '@type' ] ) this . wrapCursorWithAnd ( ) ;
427425 this . cursor [ '@type' ] = 'From' ;
428- if ( ! graphRef || typeof graph !== 'string' ) {
426+ if ( ! graphRef || typeof graphRef !== 'string' ) {
429427 return this . parameterError (
430428 'The first parameter to from must be a Graph Filter Expression (string)' ,
431429 ) ;
432430 }
433- this . cursor . graph = graphRef ;
431+ this . cursor . graph = this . jlt ( graphRef ) ;
434432 return this . addSubQuery ( query ) ;
435433} ;
436434
@@ -1487,7 +1485,7 @@ WOQLQuery.prototype.order_by = function (...orderedVarlist) {
14871485 ) ;
14881486 }
14891487 const embedquery = typeof orderedVarlist [ orderedVarlist . length - 1 ] === 'object'
1490- && orderedVarlist [ orderedVarlist . length - 1 ] . json
1488+ && orderedVarlist [ orderedVarlist . length - 1 ] . json
14911489 ? orderedVarlist . pop ( )
14921490 : false ;
14931491
0 commit comments