@@ -73,6 +73,7 @@ var CQLSearchClause = function (field, fielduri, relation, relationuri,
73
73
this . scr = scr || DEFAULT_SERVER_CHOICE_RELATION ;
74
74
this . _pos = null ;
75
75
this . _range = null ;
76
+ this . _relpos = null ;
76
77
}
77
78
78
79
CQLSearchClause . prototype = {
@@ -136,6 +137,7 @@ CQLSearchClause.prototype = {
136
137
}
137
138
if ( this . _pos !== null ) s += ', "@pos": ' + this . _pos ;
138
139
if ( this . _range !== null ) s += ', "@range": ' + JSON . stringify ( this . _range ) ;
140
+ if ( this . _relpos !== null ) s += ', "relation@pos": ' + this . _relpos ;
139
141
s += '}' ;
140
142
return s ;
141
143
} ,
@@ -226,6 +228,7 @@ var CQLParser = function () {
226
228
this . lval = null ;
227
229
this . val = null ;
228
230
this . _exprStart = null ;
231
+ this . _exprRelStart = null ;
229
232
this . prefixes = new Object ( ) ;
230
233
this . tree = null ;
231
234
this . scf = null ;
@@ -451,7 +454,8 @@ CQLParser.prototype = {
451
454
this . scf ,
452
455
this . scr ) ;
453
456
sc . _range = [ this . _exprStart , _tend ] ;
454
- this . _exprStart = null ;
457
+ sc . _relpos = this . _exprRelStart ;
458
+ this . _exprStart = this . _exprRelStart = null ;
455
459
return sc ;
456
460
}
457
461
// prefixes
@@ -499,6 +503,7 @@ CQLParser.prototype = {
499
503
} else if ( this . _strchr ( "<>=" , c ) ) {
500
504
this . look = c ;
501
505
this . qi ++ ;
506
+ this . _exprRelStart = this . qi ;
502
507
//comparitors can repeat, could be if
503
508
while ( this . qi < this . ql
504
509
&& this . _strchr ( "<>=" , this . qs . charAt ( this . qi ) ) ) {
0 commit comments