public function buildSimpleCondition($operator, $operands)
{
if (count($operands) !== 2) {
throw new InvalidParamException("Operator '{$operator}' requires two operands.");
}
list($column, $value) = $operands;
if (strncmp('$', $operator, 1) !== 0) {
static $operatorMap = ['>' => '$gt', '<' => '$lt', '>=' => '$gte', '<=' => '$lte', '!=' => '$ne', '<>' => '$ne', '=' => '$eq', '==' => '$eq'];
if (isset($operatorMap[$operator])) {
$operator = $operatorMap[$operator];
} else {
throw new InvalidParamException("Unsupported operator '{$operator}'");
}
}
return [$column => [$operator => $value]];
}