leandrogehlen / yii2-querybuilder

Extension for Yii2 Framework to work with jQuery QueryBuilder
42 stars 34 forks source link

Add NOT BETWEEN SQL operator #21

Closed SOHELAHMED7 closed 3 years ago

SOHELAHMED7 commented 3 years ago

In case of date related (date data type) fields such as birth_date, order_date etc

and in case of "NOT BETWEEN" SQL operator which jQuery query builder support

I am getting below error

Undefined index
not_between

Upon investigating, I found that NOT BETWEEN is missing from operators list

https://github.com/leandrogehlen/yii2-querybuilder/blob/master/Translator.php#L67

When I add

'not_between' =>      ['op' => 'NOT BETWEEN ?',   'list' => true, 'sep' => ' AND '],

the issue is fixed.

So this PR adds NOT_BETWEEN SQL operator

cebe commented 3 years ago

@leandrogehlen thank you for the fast merge! could you also please tag a new version?

leandrogehlen commented 3 years ago

@cebe the release has been tagged