Issue Feature Closed

#47812Query support for BETWEEN

Pascal Dürsteler 05/02/13, 10:40 updated 10/19/17, 21:59

Description

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?

Reviews 1