ransack.operator module

ransack.operator.binary_operation(operator: str, left: Any, right: Any) Any

Perform a binary operation using the specified operator and operands.

Parameters:
  • operator – The operator to apply.

  • left – The left operand.

  • right – The right operand.

Returns:

The result of the operation.

Raises:

OperatorNotFoundError – If the operator is not found for the operand types.