Loading...
Searching...
No Matches
Enumerations | Functions
Expression Operations

Description

Expression operations.

+ Collaboration diagram for Expression Operations:

Enumerations

enum  as_exp_read_flags { AS_EXP_READ_DEFAULT = 0 , AS_EXP_READ_EVAL_NO_FAIL = 16 }
 
enum  as_exp_write_flags {
  AS_EXP_WRITE_DEFAULT = 0 , AS_EXP_WRITE_CREATE_ONLY = 1 , AS_EXP_WRITE_UPDATE_ONLY = 2 , AS_EXP_WRITE_ALLOW_DELETE = 4 ,
  AS_EXP_WRITE_POLICY_NO_FAIL = 8 , AS_EXP_WRITE_EVAL_NO_FAIL = 16
}
 

Functions

AS_EXTERN bool as_operations_exp_read (as_operations *ops, const char *name, const as_exp *exp, as_exp_read_flags flags)
 
AS_EXTERN bool as_operations_exp_write (as_operations *ops, const char *name, const as_exp *exp, as_exp_write_flags flags)
 

Enumeration Type Documentation

◆ as_exp_read_flags

Expression read flags.

Enumerator
AS_EXP_READ_DEFAULT 

Default.

AS_EXP_READ_EVAL_NO_FAIL 

Ignore failures caused by the expression resolving to unknown or a non-bin type.

Definition at line 86 of file as_exp_operations.h.

◆ as_exp_write_flags

Expression write flags.

Enumerator
AS_EXP_WRITE_DEFAULT 

Default. Allow create or update.

AS_EXP_WRITE_CREATE_ONLY 

If bin does not exist, a new bin will be created. If bin exists, the operation will be denied. If bin exists, fail with AEROSPIKE_ERR_BIN_EXISTS when AS_EXP_WRITE_POLICY_NO_FAIL is not set.

AS_EXP_WRITE_UPDATE_ONLY 

If bin exists, the bin will be overwritten. If bin does not exist, the operation will be denied. If bin does not exist, fail with AEROSPIKE_ERR_BIN_NOT_FOUND when AS_EXP_WRITE_POLICY_NO_FAIL is not set.

AS_EXP_WRITE_ALLOW_DELETE 

If expression results in nil value, then delete the bin. Otherwise, return AEROSPIKE_ERR_OP_NOT_APPLICABLE when AS_EXP_WRITE_POLICY_NO_FAIL is not set.

AS_EXP_WRITE_POLICY_NO_FAIL 

Do not raise error if operation is denied.

AS_EXP_WRITE_EVAL_NO_FAIL 

Ignore failures caused by the expression resolving to unknown or a non-bin type.

Definition at line 42 of file as_exp_operations.h.

Function Documentation

◆ as_operations_exp_read()

AS_EXTERN bool as_operations_exp_read ( as_operations * ops,
const char * name,
const as_exp * exp,
as_exp_read_flags flags )

Create operation that performs a read expression. Requires server version 5.6.0+.

Parameters
opsOperations array.
nameVariable name of read expression result. This name can be used as the bin name when retrieving bin results from the record.
expExpression to evaluate.
flagsExpression read flags.

◆ as_operations_exp_write()

AS_EXTERN bool as_operations_exp_write ( as_operations * ops,
const char * name,
const as_exp * exp,
as_exp_write_flags flags )

Create operation that performs an expression that writes to a record bin. Requires server version 5.6.0+.

Parameters
opsOperations array.
nameName of bin.
expExpression to evaluate.
flagsExpression write flags. Multiple flags can be specified via "|" operator.