Exp — Expression Builder¶
Expression builder utilities.
Re-exports FilterExpression as Exp and provides a convenience val() function for creating value expressions from Python values.
- aerospike_sdk.exp.Exp¶
alias of
FilterExpression
- aerospike_sdk.exp.val(value)[source]¶
- Overloads:
value (bool) → Exp
value (int) → Exp
value (float) → Exp
value (str) → Exp
value (bytes) → Exp
value (bytearray) → Exp
value (List[Any]) → Exp
value (Dict[Any, Any]) → Exp
value (None) → Exp
Create a value expression from a Python value.
Automatically dispatches to the appropriate FilterExpression method based on the value’s type.
- aerospike_sdk.exp.in_list(value, list_exp, ctx=None)[source]¶
Check whether value exists in list_exp.
Returns a boolean expression equivalent to
value IN list.- Parameters:
- Return type:
FilterExpression
Example:
# bin "role" in list bin "allowed_roles" in_list(Exp.string_bin("role"), Exp.list_bin("allowed_roles"))
- aerospike_sdk.exp.map_keys(map_exp, ctx=None)[source]¶
Return all keys of map_exp as a list expression.
- Parameters:
- Return type:
FilterExpression
Example:
map_keys(Exp.map_bin("scores"))