Skip to content

Commit 3cd3d05

Browse files
committed
[dev] README updated
1 parent dabf32f commit 3cd3d05

File tree

1 file changed

+54
-2
lines changed

1 file changed

+54
-2
lines changed

README.md

Lines changed: 54 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ Converts JSON config to SQL Query
99
"rules": [{
1010
"field":"age",
1111
"condition":{
12-
"rule": "less",
13-
"value": 42
12+
"type": "less",
13+
"filter": 42
1414
}
1515
},{
1616
"field":"region",
@@ -19,3 +19,55 @@ Converts JSON config to SQL Query
1919
}
2020
```
2121

22+
### Supported operations ( type )
23+
24+
- equal
25+
- notEqual
26+
- contains
27+
- notContains
28+
- lessOrEqual
29+
- greaterOrEqual
30+
- less
31+
- notBetween
32+
- between
33+
- greater
34+
- beginsWith
35+
- notBeginsWith
36+
- endsWith
37+
- notEndsWith
38+
39+
### nesting
40+
41+
Blocks can be nested like next
42+
43+
```json
44+
{
45+
"glue": "and",
46+
"rules": [
47+
ruleA,
48+
{
49+
"glue": "or",
50+
"rules": [
51+
ruleC,
52+
ruleD
53+
]
54+
}
55+
]
56+
}
57+
```
58+
59+
### between / notBeetween
60+
61+
For those operations, both start and end values can be provided
62+
63+
```json
64+
{
65+
"field":"age",
66+
"condition":{
67+
"type": "between",
68+
"filter": { "start": 10, "end": 99 }
69+
}
70+
}
71+
```
72+
73+
if only *start* or *end* provided, the operation will change to *less* or *greater* automatically

0 commit comments

Comments
 (0)