public function buildBetweenCondition($indexes, $operator, $operands, &$params)
{
if (!isset($operands[0], $operands[1], $operands[2])) {
throw new Exception("Operator '{$operator}' requires three operands.");
}
list($column, $value1, $value2) = $operands;
if (strpos($column, '(') === false) {
$quotedColumn = $this->db->quoteColumnName($column);
} else {
$quotedColumn = $column;
}
$phName1 = $this->composeColumnValue($indexes, $column, $value1, $params);
$phName2 = $this->composeColumnValue($indexes, $column, $value2, $params);
return "{$quotedColumn} {$operator} {$phName1} AND {$phName2}";
}