laravel-api-handler icon indicating copy to clipboard operation
laravel-api-handler copied to clipboard

Filter min and null combined

Open priithansen opened this issue 10 years ago • 3 comments
trafficstars

Stumbled upon a usercase where I would have to make an comparison on a nullable datetime field ended_at-min OR null.

Wonder if there is any way to make that possible?

priithansen avatar May 20 '15 09:05 priithansen

Don't know if it makes sense but maybe having col_name-or-min/max/.. properties supported for parameter grouping would be a good idea.

priithansen avatar May 20 '15 10:05 priithansen

Not possible at the moment. Currently thinking about or-col_name-min, so adding it as a prefix and leaving the default as AND. I may rewrite the package though and this may not be added until then. Sorry for the late reply.

marcelgwerder avatar Oct 24 '15 08:10 marcelgwerder

Thanks for the relply. I thus far worked around this with a dirty request parameter comparison and query fix in controller.

or- prefix sounds like a great idea. Thanks for the package it has been a great help implementing flexible apis while keeping the code dry :+1:

priithansen avatar Oct 27 '15 18:10 priithansen