Function aerospike::expressions::num_div
source · pub const fn num_div(exps: Vec<FilterExpression>) -> FilterExpression
Expand description
Create “divide” (/) operator that applies to a variable number of expressions.
If there is only one FilterExpressions
, returns the reciprocal for that FilterExpressions
.
Otherwise, return the first FilterExpressions
divided by the product of the rest.
All FilterExpressions
must resolve to the same type (integer or float).
Requires server version 5.6.0+.
use aerospike::expressions::{lt, int_val, int_bin, num_div};
// a / b / c > 1
lt(num_div(vec![int_bin("a".to_string()), int_bin("b".to_string()), int_bin("c".to_string())]), int_val(1));