Skip to content

Commit 269e828

Browse files
committed
[update] README.md
1 parent ee7b2c2 commit 269e828

File tree

1 file changed

+22
-16
lines changed

1 file changed

+22
-16
lines changed

README.md

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,20 @@ JSON to SQL Query
33

44
Converts JSON config to SQL Query
55

6-
```json
6+
```js
77
{
88
"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+
]
1720
}
1821
```
1922

@@ -38,7 +41,7 @@ Converts JSON config to SQL Query
3841

3942
Blocks can be nested like next
4043

41-
```json
44+
```js
4245
{
4346
"glue": "and",
4447
"rules": [
@@ -48,22 +51,25 @@ Blocks can be nested like next
4851
"rules": [
4952
ruleC,
5053
ruleD
51-
]
54+
]
5255
}
53-
]
56+
]
5457
}
5558
```
5659

5760
### between / notBetween
5861

5962
For those operations, both start and end values can be provided
6063

61-
```json
64+
```js
6265
{
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
6671
}
72+
}
6773
```
6874

6975
if only *start* or *end* provided, the operation will change to *less* or *greater* automatically

0 commit comments

Comments
 (0)