Function aerospike::expressions::num_sub
source · pub const fn num_sub(exps: Vec<FilterExpression>) -> FilterExpression
Expand description
Create “subtract” (-) operator that applies to a variable number of expressions.
If only one FilterExpressions
is provided, return the negation of that argument.
Otherwise, return the sum of the 2nd to Nth FilterExpressions
subtracted from the 1st
FilterExpressions
. All FilterExpressions
must resolve to the same type (integer or float).
Requires server version 5.6.0+.
use aerospike::expressions::{gt, num_sub, int_bin, int_val};
// a - b - c > 10
gt(num_sub(vec![int_bin("a".to_string()), int_bin("b".to_string()), int_bin("c".to_string())]), int_val(10));