Add BETWEEN() expr.
The PullRuest added one BETWEEN class and a new method for NOT BETWEEN.
#6450 here example for this issues
between and function
$queryBuilder
->where(
$queryBuilder->expr()->between('CURRENT_TIMESTAMP()', ':min', ':max')
)
->setParameter('min', '2018-04-10 10:19:37')
->setParameter('max', '2018-04-12 10:19:37')
;
not between and mysql function (The mysql function can not use as parameter)
$queryBuilder
->where(
$queryBuilder->expr()->between('CURRENT_TIMESTAMP()', ':min', ':max')
)
->setParameter('min', '2018-04-10 10:19:37')
->setParameter('max', '2018-04-12 10:19:37')
;
with orX and between
$queryBuilder
->where(
$queryBuilder->expr()->orX(
$queryBuilder->expr()->isNull('user.firstName'),
$queryBuilder->expr()->between(':val', 1, 10)
)
)
->setParameter('val', 5)
;
We're doing some housekeeping on the 3.0.0 milestone. Since nobody seems to be actively working on this topic I'm removing this PR from the 3.0.0 milestone. I you want to pick up the work, please target the ORM's next feature release (currently 2.13.0) instead.
@frag-seb would it be possible to target a 2.x version for this PR?
It would resolve this bug https://github.com/doctrine/orm/issues/6450
There hasn't been any activity on this pull request in the past 90 days, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 7 days. If you want to continue working on it, please leave a comment.
As mentioned in https://github.com/doctrine/orm/pull/7184#issuecomment-1661986993, I think it is still useful to resolve https://github.com/doctrine/orm/issues/6450
There hasn't been any activity on this pull request in the past 90 days, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 7 days. If you want to continue working on it, please leave a comment.
This pull request was closed due to inactivity.