persvr / rql

Resource Query Language
http://www.persvr.org/
268 stars 49 forks source link

inconsistent filter #82

Closed yachShekhar closed 5 years ago

yachShekhar commented 5 years ago

and(or(eq(foo,3),eq(foo,bar)),lt(price,10)) above expression is generating below json where first and has only one element in args. { "name": "and", "args": [ { "name": "or", "args": [ { "name": "eq", "args": [ "foo", 3 ] }, { "name": "eq", "args": [ "foo", "bar" ] } ] }, { "name": "lt", "args": [ "price", 10 ] } ], "cache": {} }

while (foo=3|foo=bar)&price=lt=10 is generating below json which is fine { "name": "and", "args": [ { "name": "or", "args": [ { "name": "eq", "args": [ "foo", 3 ] }, { "name": "eq", "args": [ "foo", "bar" ] } ] }, { "name": "lt", "args": [ "price", 10 ] } ], "cache": {} }

if both expression is same then they should produce same json output.