nestjsx / crud

NestJs CRUD for RESTful APIs

Home Page:https://github.com/nestjsx/crud/wiki

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OR & AND operators issue

alexsun8899 opened this issue · comments

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

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