File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -312,8 +312,6 @@ WOQLQuery.prototype.comment = function (comment, subquery) {
312
312
*/
313
313
314
314
WOQLQuery . prototype . select = function ( ...varNames ) {
315
- // if (list && list[0] === 'args')
316
- // return ['variable_list', 'query']
317
315
if ( this . cursor [ '@type' ] ) this . wrapCursorWithAnd ( ) ;
318
316
this . cursor [ '@type' ] = 'Select' ;
319
317
if ( ! varNames || varNames . length <= 0 ) {
@@ -324,7 +322,7 @@ WOQLQuery.prototype.select = function (...varNames) {
324
322
*@type {any }
325
323
*/
326
324
let embedquery = false ;
327
- if ( typeof last === 'object' && last . json ) {
325
+ if ( typeof last === 'object' && ! ( last instanceof Var ) && last . json ) {
328
326
embedquery = varNames . pop ( ) ;
329
327
} // else var embedquery = false
330
328
this . cursor . variables = this . rawVarList ( varNames ) ;
@@ -350,7 +348,7 @@ WOQLQuery.prototype.distinct = function (...varNames) {
350
348
* @type {any }
351
349
*/
352
350
let embedquery = false ;
353
- if ( typeof last === 'object' && last . json ) {
351
+ if ( typeof last === 'object' && ! ( last instanceof Var ) && last . json ) {
354
352
embedquery = varNames . pop ( ) ;
355
353
} // else var embedquery = false
356
354
this . cursor . variables = this . rawVarList ( varNames ) ;
You can’t perform that action at this time.
0 commit comments