File tree 3 files changed +24
-4
lines changed 3 files changed +24
-4
lines changed Original file line number Diff line number Diff line change @@ -401,6 +401,7 @@ define([
401
401
} ) ;
402
402
expect ( doc . toQuery ( ) ) . toEqual ( 'pubDate in 2014' ) ;
403
403
404
+ // Checks for integer values
404
405
doc = integerFactory . create ( ) ;
405
406
expect ( doc . toQuery ( ) ) . toEqual ( 'KED.nToks = 200' ) ;
406
407
@@ -421,7 +422,18 @@ define([
421
422
} ) ;
422
423
expect ( doc . toQuery ( ) ) . toEqual ( 'KED.nToks <= 100' ) ;
423
424
424
- // Check for numeric values
425
+ doc = integerFactory . create ( {
426
+ value : "100" ,
427
+ match : "match:gt"
428
+ } ) ;
429
+ expect ( doc . toQuery ( ) ) . toEqual ( 'KED.nToks > 100' ) ;
430
+
431
+ doc = integerFactory . create ( {
432
+ value : "100" ,
433
+ match : "match:lt"
434
+ } ) ;
435
+ expect ( doc . toQuery ( ) ) . toEqual ( 'KED.nToks < 100' ) ;
436
+
425
437
doc = integerFactory . create ( {
426
438
value : 100 ,
427
439
} ) ;
Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ define([
74
74
KorAP . _validUnspecMatchRE = new RegExp (
75
75
"^(?:eq|ne|contains(?:not)?|excludes)$" ) ;
76
76
KorAP . _validStringMatchRE = new RegExp ( "^(?:eq|ne)$" ) ;
77
- KorAP . _validIntegerMatchRE = new RegExp ( "^(?:[gl]?eq|ne)$" ) ;
77
+ KorAP . _validIntegerMatchRE = new RegExp ( "^(?:[gl]?eq|ne|[gl]t )$" ) ;
78
78
KorAP . _validTextMatchRE = KorAP . _validUnspecMatchRE ;
79
79
KorAP . _validTextOnlyMatchRE = new RegExp (
80
80
"^(?:contains(?:not)?|excludes)$" ) ;
@@ -117,7 +117,9 @@ define([
117
117
[ 'eq' , null ] ,
118
118
[ 'ne' , null ] ,
119
119
[ 'geq' , null ] ,
120
- [ 'leq' , null ]
120
+ [ 'leq' , null ] ,
121
+ [ 'gt' , null ] ,
122
+ [ 'lt' , null ]
121
123
] )
122
124
} ;
123
125
Original file line number Diff line number Diff line change @@ -715,7 +715,13 @@ define([
715
715
case "leq" :
716
716
string += ( this . type ( ) == 'date' ) ? 'until' : '<=' ;
717
717
break ;
718
- default :
718
+ case "lt" :
719
+ string += '<' ;
720
+ break ;
721
+ case "gt" :
722
+ string += '>' ;
723
+ break ;
724
+ default :
719
725
string += ( this . type ( ) == 'date' ) ? 'in' : '=' ;
720
726
break ;
721
727
} ;
You can’t perform that action at this time.
0 commit comments