nestjsx / crud

NestJs CRUD for RESTful APIs
https://github.com/nestjsx/crud/wiki
MIT License
4.06k stars 538 forks source link

OR & AND operators issue #792

Open alexsun8899 opened 2 years ago

alexsun8899 commented 2 years ago

how do I achieve WHERE ({filter} AND {filter} AND ...) OR ({or} AND {or} AND ...) OR ({or} And {or }and …)?

Seems the lib doesn’t support it according to below docs…

If present both or and filter in any amount (one or miltiple each) then both interpreted as a combitation of AND conditions and compared with each other by OR condition, as follows: WHERE ({filter} AND {filter} AND ...) OR ({or} AND {or} AND ...) ?filter=type||$eq||hero&filter=status||$eq||alive&or=type||$eq||villain&or=status||$eq||dead

0x7061 commented 1 year ago

You can implement more complex queries by using the JSON search option ?s={}, see documentation.