ExpCond Method
Conditionally select an expression from a variable number of expression pairs
followed by default expression action. Requires server version 5.6.0+.
Namespace: Aerospike.ClientAssembly: AerospikeClient (in AerospikeClient.dll) Version: 7.0.1
public static Exp Cond(
params Exp[] exps
)
- exps Exp
-
Exp // Args Format: bool exp1, action exp1, bool exp2, action exp2, ..., action-default
// Apply operator based on type.
Exp.cond(
Exp.EQ(Exp.IntBin("type"), Exp.Val(0)), Exp.Add(Exp.IntBin("val1"), Exp.IntBin("val2")),
Exp.EQ(Exp.IntBin("type"), Exp.Val(1)), Exp.Sub(Exp.IntBin("val1"), Exp.IntBin("val2")),
Exp.EQ(Exp.IntBin("type"), Exp.Val(2)), Exp.Mul(Exp.IntBin("val1"), Exp.IntBin("val2")),
Exp.Val(-1));