File tree 1 file changed +22
-16
lines changed
1 file changed +22
-16
lines changed Original file line number Diff line number Diff line change @@ -3,17 +3,20 @@ JSON to SQL Query
3
3
4
4
Converts JSON config to SQL Query
5
5
6
- ``` json
6
+ ``` js
7
7
{
8
8
" glue" : " and" ,
9
- "rules" : [{
10
- "field" : " age" ,
11
- "filter" : " less" ,
12
- "value" : 42
13
- },{
14
- "field" : " region" ,
15
- "includes" : [1 ,2 ,6 ]
16
- }]
9
+ " rules" : [
10
+ {
11
+ " field" : " age" ,
12
+ " filter" : " less" ,
13
+ " value" : 42
14
+ },
15
+ {
16
+ " field" : " region" ,
17
+ " includes" : [1 ,2 ,6 ]
18
+ }
19
+ ]
17
20
}
18
21
```
19
22
@@ -38,7 +41,7 @@ Converts JSON config to SQL Query
38
41
39
42
Blocks can be nested like next
40
43
41
- ``` json
44
+ ``` js
42
45
{
43
46
" glue" : " and" ,
44
47
" rules" : [
@@ -48,22 +51,25 @@ Blocks can be nested like next
48
51
" rules" : [
49
52
ruleC,
50
53
ruleD
51
- ]
54
+ ]
52
55
}
53
- ]
56
+ ]
54
57
}
55
58
```
56
59
57
60
### between / notBetween
58
61
59
62
For those operations, both start and end values can be provided
60
63
61
- ``` json
64
+ ``` js
62
65
{
63
- "field" :" age" ,
64
- "filter" : " between" ,
65
- "value" : { "start" : 10 , "end" : 99 }
66
+ " field" : " age" ,
67
+ " filter" : " between" ,
68
+ " value" : {
69
+ " start" : 10 ,
70
+ " end" : 99
66
71
}
72
+ }
67
73
```
68
74
69
75
if only * start* or * end* provided, the operation will change to * less* or * greater* automatically
You can’t perform that action at this time.
0 commit comments