public function buildBetweenCondition($operator, $operands)
{
if (!isset($operands[0], $operands[1], $operands[2])) {
throw new InvalidParamException("Operator '{$operator}' requires three operands.");
}
list($column, $value1, $value2) = $operands;
if (strncmp('NOT', $operator, 3) === 0) {
return [$column => ['$lt' => $value1, '$gt' => $value2]];
} else {
return [$column => ['$gte' => $value1, '$lte' => $value2]];
}
}