@@ -10,11 +10,11 @@ void main() {
1010 final filterScore = Filter .facet ('attributeA' , true , score: 4 );
1111
1212 const converter = FilterConverter ();
13- expect (converter.sql (filterTrue), '\ " attributeA\ " :true' );
14- expect (converter.sql (filterFalse), '\ " attributeA\ " :false' );
15- expect (converter.sql (filterTrue.not ()), 'NOT \ " attributeA\ " :true' );
16- expect (converter.sql (filterFalse.not ()), 'NOT \ " attributeA\ " :false' );
17- expect (converter.sql (filterScore), '\ " attributeA\ " :true<score=4>' );
13+ expect (converter.sql (filterTrue), '"attributeA":true' );
14+ expect (converter.sql (filterFalse), '"attributeA":false' );
15+ expect (converter.sql (filterTrue.not ()), 'NOT "attributeA":true' );
16+ expect (converter.sql (filterFalse.not ()), 'NOT "attributeA":false' );
17+ expect (converter.sql (filterScore), '"attributeA":true<score=4>' );
1818 });
1919
2020 test ('Filter facet Number' , () {
@@ -23,11 +23,11 @@ void main() {
2323 final filterScore = Filter .facet ('attributeA' , 1 , score: 2 );
2424
2525 const converter = FilterConverter ();
26- expect (converter.sql (filterInt), '\ " attributeA\ " :1' );
27- expect (converter.sql (filterDouble), '\ " attributeA\ " :${1.0 }' );
28- expect (converter.sql (filterDouble.not ()), 'NOT \ " attributeA\ " :${1.0 }' );
29- expect (converter.sql (filterScore), '\ " attributeA\ " :1<score=2>' );
30- expect (converter.sql (filterScore), '\ " attributeA\ " :1<score=2>' );
26+ expect (converter.sql (filterInt), '"attributeA":1' );
27+ expect (converter.sql (filterDouble), '"attributeA":${1.0 }' );
28+ expect (converter.sql (filterDouble.not ()), 'NOT "attributeA":${1.0 }' );
29+ expect (converter.sql (filterScore), '"attributeA":1<score=2>' );
30+ expect (converter.sql (filterScore), '"attributeA":1<score=2>' );
3131 });
3232
3333 test ('Filter facet String' , () {
@@ -37,15 +37,15 @@ void main() {
3737 final filterScore = Filter .facet ('attributeA' , 'valueA' , score: 1 );
3838
3939 const converter = FilterConverter ();
40- expect (converter.sql (filter), '\ " attributeA\" : \ " valueA\ " ' );
41- expect (converter.sql (filterNegate), 'NOT \ " attributeA\" : \ " valueA\ " ' );
40+ expect (converter.sql (filter), '"attributeA": "valueA"' );
41+ expect (converter.sql (filterNegate), 'NOT "attributeA": "valueA"' );
4242 expect (
4343 converter.sql (filterSpace),
44- '\ " attributeA\" : \ " value with space\ " ' ,
44+ '"attributeA": "value with space"' ,
4545 );
4646 expect (
4747 converter.sql (filterScore),
48- '\ " attributeA\" : \ " valueA\ " <score=1>' ,
48+ '"attributeA": "valueA"<score=1>' ,
4949 );
5050 });
5151 });
@@ -64,13 +64,13 @@ void main() {
6464 Filter .comparison ('attributeA' , NumericOperator .greaterOrEquals, 5 );
6565
6666 const converter = FilterConverter ();
67- expect (converter.sql (less), '\ " attributeA\ " < 5' );
68- expect (converter.sql (lessOrEquals), '\ " attributeA\ " <= 5' );
69- expect (converter.sql (equals), '\ " attributeA\ " = 5' );
70- expect (converter.sql (notEquals), '\ " attributeA\ " != 5' );
71- expect (converter.sql (greater), '\ " attributeA\ " > 5' );
72- expect (converter.sql (greaterOrEquals), '\ " attributeA\ " >= 5' );
73- expect (converter.sql (less.not ()), 'NOT \ " attributeA\ " < 5' );
67+ expect (converter.sql (less), '"attributeA" < 5' );
68+ expect (converter.sql (lessOrEquals), '"attributeA" <= 5' );
69+ expect (converter.sql (equals), '"attributeA" = 5' );
70+ expect (converter.sql (notEquals), '"attributeA" != 5' );
71+ expect (converter.sql (greater), '"attributeA" > 5' );
72+ expect (converter.sql (greaterOrEquals), '"attributeA" >= 5' );
73+ expect (converter.sql (less.not ()), 'NOT "attributeA" < 5' );
7474 });
7575
7676 test ('Filter numeric range' , () {
@@ -80,17 +80,17 @@ void main() {
8080 Filter .range ('attributeA' , lowerBound: 0.0 , upperBound: 6.0 );
8181
8282 const converter = FilterConverter ();
83- expect (converter.sql (filterInt), '\ " attributeA\ " :0 TO 6' );
84- expect (converter.sql (filterDouble), '\ " attributeA\ " :${0.0 } TO ${6.0 }' );
85- expect (converter.sql (filterInt.not ()), 'NOT \ " attributeA\ " :0 TO 6' );
83+ expect (converter.sql (filterInt), '"attributeA":0 TO 6' );
84+ expect (converter.sql (filterDouble), '"attributeA":${0.0 } TO ${6.0 }' );
85+ expect (converter.sql (filterInt.not ()), 'NOT "attributeA":0 TO 6' );
8686 });
8787 });
8888
8989 test ('Filter tag SQL' , () {
9090 final filter = Filter .tag ('valueA' );
9191 const converter = FilterConverter ();
92- expect (converter.sql (filter), '_tags:\ " valueA\ " ' );
93- expect (converter.sql (filter.not ()), 'NOT _tags:\ " valueA\ " ' );
92+ expect (converter.sql (filter), '_tags:"valueA"' );
93+ expect (converter.sql (filter.not ()), 'NOT _tags:"valueA"' );
9494 });
9595
9696 group ('Filter group SQL' , () {
0 commit comments