Query support for BETWEEN
I would like to introduce the between-operator into the query class. This would allow shorter queries, and maybe a better performance for queries currently relying on two conditions.
So instead of
$query->logicalAnd( $query->greaterThanOrEqual($propertyName, $operand), $query->lessThanOrEqual($propertyName, $operand) );
One could simply write
$query->logicalAnd( $query->between($propertyName, $minOperand, $maxOperand) );
What do you think?
Updated by Alexander Schnitzler over 10 years ago
- Status changed from New to Needs Feedback
I just googled a bit and it seems there's no real difference in performance using between, in or "> <". So I think the underlying sql does not have to be adjusted but for sure the between constraint is a nice shortcut.
Unfortunetly I did not find the support in Flow so I will pass this on to my team mates to decide.
Updated by Alexander Opitz about 9 years ago
- Project changed from 534 to TYPO3 Core
- Category changed from Extbase: Generic Persistence to Extbase
- Assignee changed from Tymoteusz Motylewski to Xavier Perseguers
- Target version changed from Extbase 6.3 to 7.0
it seams the question about "between" was for you.