-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
Description
As noted in the readme, this::
{
"column": "name"
"operator": "like"
"value": {
"operator": "or",
"value": [
"Bill",
"Mary",
"Steve"
]
}
}
is much more readable than this::
{
"operator": "or",
"value": [
{
"column": "name",
"operator": "like",
"value": "Bill"
},
{
"column": "name",
"operator": "like",
"value": "Mary"
},
{
"column": "name",
"operator": "like",
"value": "Steve"
},
]
}
By collapsing the redundant information (column and operator) the intent is much more readable.
Concerns while implementing:
- What's the information propagation limit for values? The above is an easy choice, but what if one of those values wasn't a string, but another node?
- Can nodes overwrite operator values defined above? What if in the first snipped the user wants to use the
likeoperator for 11 names but then useilikethe operator for "Mary"? Could they make the element a node that overrides operator, or do they have to nest the above in another OR to include the field?