usmanhalalit / pixie

Database query builder for PHP, framework agnostic, lightweight and expressive.
MIT License
672 stars 180 forks source link

Custom search operators #174

Open hastom opened 7 years ago

hastom commented 7 years ago

Hi,

I want to add some custom operators to where method (like more flexible between that adapts if there is only one value in array) and support for literal operators like 'ge' (>), 'le'(<) and others. So I extended QueryBuilderHandler class and overrided "where" and "orWhere" methods. Everything worked fine until I tried to use my custom operators inside nested criteria. I figured out that it happens because NestedCriteria class extends QueryBuilderHandler and not my custom class. I cannot extend it too because its injected inside BaseAdapter and I dont want to extend everithing..

May be im doing something wrong? Any ideas?

usmanhalalit commented 7 years ago

You're not doing wrong, that's a limitation of the lib. Can you please come up with a list of operators you would like have added?

eL-Prova commented 6 years ago

And a simple example can be helpful