Exp Cond Method Aerospike
Conditionally select an expression from a variable number of expression pairs followed by default expression action. Requires server version 5.6.0+.

Namespace: Aerospike.Client
Assembly: AerospikeClient (in AerospikeClient.dll) Version: 4.2.1.0 (4.2.1)
Syntax

Parameters

exps
Type:  Aerospike.Client Exp 
Examples

// 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));
See Also