Loading...
Searching...
No Matches
Data Structures | Enumerations | Functions
List Operations

Description

List bin operations. Create list operations used by client operate command.

List operations support negative indexing. If the index is negative, the resolved index starts backwards from end of list. If an index is out of bounds, a parameter error will be returned. If a range is partially out of bounds, the valid part of the range will be returned. Index/Range examples:

Example 1:

// list bin = [7,9,5]
// Append 11 to list bin.
as_operations_inita(&ops, 1);
as_integer_init(&val, 11);
as_operations_list_append(&ops, "bin", NULL, NULL, &val);
as_record* rec = 0;
aerospike_key_operate(&as, &err, NULL, &key, &ops, &rec);
// bin result = [7,9,5,11]
as_operations_destroy(&ops);
as_record_destroy(rec);
AS_EXTERN as_integer * as_integer_init(as_integer *integer, int64_t value)
AS_EXTERN as_status aerospike_key_operate(aerospike *as, as_error *err, const as_policy_operate *policy, const as_key *key, const as_operations *ops, as_record **rec)
AS_EXTERN bool as_operations_list_append(as_operations *ops, const char *name, as_cdt_ctx *ctx, as_list_policy *policy, as_val *val)

Nested CDT operations are supported by optional context (as_cdt_ctx). Example:

// bin = [[7,9,5],[1,2,3],[6,5,4,1]]
// Append 11 to last list.
as_cdt_ctx_inita(&ctx, 1);
as_cdt_ctx_add_list_index(&ctx, -1);
as_operations_inita(&ops, 1);
as_integer_init(&val, 11);
as_operations_list_append(&ops, "bin", &ctx, NULL, &val);
as_record* rec = 0;
aerospike_key_operate(&as, &err, NULL, &key, &ops, &rec);
// bin result = [[7,9,5],[1,2,3],[6,5,4,1,11]]
as_operations_destroy(&ops);
as_record_destroy(rec);
+ Collaboration diagram for List Operations:

Data Structures

struct  as_list_policy
 

Enumerations

enum  as_list_order { AS_LIST_UNORDERED = 0 , AS_LIST_ORDERED = 1 }
 
enum  as_list_return_type {
  AS_LIST_RETURN_NONE = 0 , AS_LIST_RETURN_INDEX = 1 , AS_LIST_RETURN_REVERSE_INDEX = 2 , AS_LIST_RETURN_RANK = 3 ,
  AS_LIST_RETURN_REVERSE_RANK = 4 , AS_LIST_RETURN_COUNT = 5 , AS_LIST_RETURN_VALUE = 7 , AS_LIST_RETURN_EXISTS = 13 ,
  AS_LIST_RETURN_INVERTED = 0x10000
}
 
enum  as_list_sort_flags { AS_LIST_SORT_DEFAULT = 0 , AS_LIST_SORT_DROP_DUPLICATES = 2 }
 
enum  as_list_write_flags {
  AS_LIST_WRITE_DEFAULT = 0 , AS_LIST_WRITE_ADD_UNIQUE = 1 , AS_LIST_WRITE_INSERT_BOUNDED = 2 , AS_LIST_WRITE_NO_FAIL = 4 ,
  AS_LIST_WRITE_PARTIAL = 8
}
 

Functions

static void as_list_policy_init (as_list_policy *policy)
 
static void as_list_policy_set (as_list_policy *policy, as_list_order order, as_list_write_flags flags)
 
static bool as_operations_add_list_append (as_operations *ops, const char *name, as_val *val)
 
static bool as_operations_add_list_append_double (as_operations *ops, const char *name, double value)
 
static bool as_operations_add_list_append_int64 (as_operations *ops, const char *name, int64_t value)
 
static bool as_operations_add_list_append_items (as_operations *ops, const char *name, as_list *list)
 
static bool as_operations_add_list_append_items_with_policy (as_operations *ops, const char *name, as_list_policy *policy, as_list *list)
 
static bool as_operations_add_list_append_raw (as_operations *ops, const char *name, const uint8_t *value, uint32_t size)
 
static bool as_operations_add_list_append_rawp (as_operations *ops, const char *name, const uint8_t *value, uint32_t size, bool free)
 
static bool as_operations_add_list_append_str (as_operations *ops, const char *name, const char *value)
 
static bool as_operations_add_list_append_strp (as_operations *ops, const char *name, const char *value, bool free)
 
static bool as_operations_add_list_append_with_policy (as_operations *ops, const char *name, as_list_policy *policy, as_val *val)
 
static bool as_operations_add_list_clear (as_operations *ops, const char *name)
 
static bool as_operations_add_list_get (as_operations *ops, const char *name, int64_t index)
 
static bool as_operations_add_list_get_by_index (as_operations *ops, const char *name, int64_t index, as_list_return_type return_type)
 
static bool as_operations_add_list_get_by_index_range (as_operations *ops, const char *name, int64_t index, uint64_t count, as_list_return_type return_type)
 
static bool as_operations_add_list_get_by_index_range_to_end (as_operations *ops, const char *name, int64_t index, as_list_return_type return_type)
 
static bool as_operations_add_list_get_by_rank (as_operations *ops, const char *name, int64_t rank, as_list_return_type return_type)
 
static bool as_operations_add_list_get_by_rank_range (as_operations *ops, const char *name, int64_t rank, uint64_t count, as_list_return_type return_type)
 
static bool as_operations_add_list_get_by_rank_range_to_end (as_operations *ops, const char *name, int64_t rank, as_list_return_type return_type)
 
static bool as_operations_add_list_get_by_value (as_operations *ops, const char *name, as_val *value, as_list_return_type return_type)
 
static bool as_operations_add_list_get_by_value_list (as_operations *ops, const char *name, as_list *values, as_list_return_type return_type)
 
static bool as_operations_add_list_get_by_value_range (as_operations *ops, const char *name, as_val *begin, as_val *end, as_list_return_type return_type)
 
static bool as_operations_add_list_get_by_value_rel_rank_range (as_operations *ops, const char *name, as_val *value, int64_t rank, uint64_t count, as_list_return_type return_type)
 
static bool as_operations_add_list_get_by_value_rel_rank_range_to_end (as_operations *ops, const char *name, as_val *value, int64_t rank, as_list_return_type return_type)
 
static bool as_operations_add_list_get_range (as_operations *ops, const char *name, int64_t index, uint64_t count)
 
static bool as_operations_add_list_get_range_from (as_operations *ops, const char *name, int64_t index)
 
static bool as_operations_add_list_increment (as_operations *ops, const char *name, int64_t index, as_val *incr)
 
static bool as_operations_add_list_increment_with_policy (as_operations *ops, const char *name, as_list_policy *policy, int64_t index, as_val *incr)
 
static bool as_operations_add_list_insert (as_operations *ops, const char *name, int64_t index, as_val *val)
 
static bool as_operations_add_list_insert_double (as_operations *ops, const char *name, int64_t index, double value)
 
static bool as_operations_add_list_insert_int64 (as_operations *ops, const char *name, int64_t index, int64_t value)
 
static bool as_operations_add_list_insert_items (as_operations *ops, const char *name, int64_t index, as_list *list)
 
static bool as_operations_add_list_insert_items_with_policy (as_operations *ops, const char *name, as_list_policy *policy, int64_t index, as_list *list)
 
static bool as_operations_add_list_insert_raw (as_operations *ops, const char *name, int64_t index, const uint8_t *value, uint32_t size)
 
static bool as_operations_add_list_insert_rawp (as_operations *ops, const char *name, int64_t index, const uint8_t *value, uint32_t size, bool free)
 
static bool as_operations_add_list_insert_str (as_operations *ops, const char *name, int64_t index, const char *value)
 
static bool as_operations_add_list_insert_strp (as_operations *ops, const char *name, int64_t index, const char *value, bool free)
 
static bool as_operations_add_list_insert_with_policy (as_operations *ops, const char *name, as_list_policy *policy, int64_t index, as_val *val)
 
static bool as_operations_add_list_pop (as_operations *ops, const char *name, int64_t index)
 
static bool as_operations_add_list_pop_range (as_operations *ops, const char *name, int64_t index, uint64_t count)
 
static bool as_operations_add_list_pop_range_from (as_operations *ops, const char *name, int64_t index)
 
static bool as_operations_add_list_remove (as_operations *ops, const char *name, int64_t index)
 
static bool as_operations_add_list_remove_by_index (as_operations *ops, const char *name, int64_t index, as_list_return_type return_type)
 
static bool as_operations_add_list_remove_by_index_range (as_operations *ops, const char *name, int64_t index, uint64_t count, as_list_return_type return_type)
 
static bool as_operations_add_list_remove_by_index_range_to_end (as_operations *ops, const char *name, int64_t index, as_list_return_type return_type)
 
static bool as_operations_add_list_remove_by_rank (as_operations *ops, const char *name, int64_t rank, as_list_return_type return_type)
 
static bool as_operations_add_list_remove_by_rank_range (as_operations *ops, const char *name, int64_t rank, uint64_t count, as_list_return_type return_type)
 
static bool as_operations_add_list_remove_by_rank_range_to_end (as_operations *ops, const char *name, int64_t rank, as_list_return_type return_type)
 
static bool as_operations_add_list_remove_by_value (as_operations *ops, const char *name, as_val *value, as_list_return_type return_type)
 
static bool as_operations_add_list_remove_by_value_list (as_operations *ops, const char *name, as_list *values, as_list_return_type return_type)
 
static bool as_operations_add_list_remove_by_value_range (as_operations *ops, const char *name, as_val *begin, as_val *end, as_list_return_type return_type)
 
static bool as_operations_add_list_remove_by_value_rel_rank_range (as_operations *ops, const char *name, as_val *value, int64_t rank, uint64_t count, as_list_return_type return_type)
 
static bool as_operations_add_list_remove_by_value_rel_rank_range_to_end (as_operations *ops, const char *name, as_val *value, int64_t rank, as_list_return_type return_type)
 
static bool as_operations_add_list_remove_range (as_operations *ops, const char *name, int64_t index, uint64_t count)
 
static bool as_operations_add_list_remove_range_from (as_operations *ops, const char *name, int64_t index)
 
static bool as_operations_add_list_set (as_operations *ops, const char *name, int64_t index, as_val *val)
 
static bool as_operations_add_list_set_double (as_operations *ops, const char *name, int64_t index, double value)
 
static bool as_operations_add_list_set_int64 (as_operations *ops, const char *name, int64_t index, int64_t value)
 
static bool as_operations_add_list_set_order (as_operations *ops, const char *name, as_list_order order)
 
static bool as_operations_add_list_set_raw (as_operations *ops, const char *name, int64_t index, const uint8_t *value, uint32_t size)
 
static bool as_operations_add_list_set_rawp (as_operations *ops, const char *name, int64_t index, const uint8_t *value, uint32_t size, bool free)
 
static bool as_operations_add_list_set_str (as_operations *ops, const char *name, int64_t index, const char *value)
 
static bool as_operations_add_list_set_strp (as_operations *ops, const char *name, int64_t index, const char *value, bool free)
 
static bool as_operations_add_list_set_with_policy (as_operations *ops, const char *name, as_list_policy *policy, int64_t index, as_val *val)
 
static bool as_operations_add_list_size (as_operations *ops, const char *name)
 
static bool as_operations_add_list_sort (as_operations *ops, const char *name, as_list_sort_flags flags)
 
static bool as_operations_add_list_trim (as_operations *ops, const char *name, int64_t index, uint64_t count)
 
AS_EXTERN bool as_operations_list_append (as_operations *ops, const char *name, as_cdt_ctx *ctx, as_list_policy *policy, as_val *val)
 
AS_EXTERN bool as_operations_list_append_items (as_operations *ops, const char *name, as_cdt_ctx *ctx, as_list_policy *policy, as_list *list)
 
AS_EXTERN bool as_operations_list_clear (as_operations *ops, const char *name, as_cdt_ctx *ctx)
 
AS_EXTERN bool as_operations_list_create (as_operations *ops, const char *name, as_cdt_ctx *ctx, as_list_order order, bool pad)
 
AS_EXTERN bool as_operations_list_get (as_operations *ops, const char *name, as_cdt_ctx *ctx, int64_t index)
 
AS_EXTERN bool as_operations_list_get_by_index (as_operations *ops, const char *name, as_cdt_ctx *ctx, int64_t index, as_list_return_type return_type)
 
AS_EXTERN bool as_operations_list_get_by_index_range (as_operations *ops, const char *name, as_cdt_ctx *ctx, int64_t index, uint64_t count, as_list_return_type return_type)
 
AS_EXTERN bool as_operations_list_get_by_index_range_to_end (as_operations *ops, const char *name, as_cdt_ctx *ctx, int64_t index, as_list_return_type return_type)
 
AS_EXTERN bool as_operations_list_get_by_rank (as_operations *ops, const char *name, as_cdt_ctx *ctx, int64_t rank, as_list_return_type return_type)
 
AS_EXTERN bool as_operations_list_get_by_rank_range (as_operations *ops, const char *name, as_cdt_ctx *ctx, int64_t rank, uint64_t count, as_list_return_type return_type)
 
AS_EXTERN bool as_operations_list_get_by_rank_range_to_end (as_operations *ops, const char *name, as_cdt_ctx *ctx, int64_t rank, as_list_return_type return_type)
 
AS_EXTERN bool as_operations_list_get_by_value (as_operations *ops, const char *name, as_cdt_ctx *ctx, as_val *value, as_list_return_type return_type)
 
AS_EXTERN bool as_operations_list_get_by_value_list (as_operations *ops, const char *name, as_cdt_ctx *ctx, as_list *values, as_list_return_type return_type)
 
AS_EXTERN bool as_operations_list_get_by_value_range (as_operations *ops, const char *name, as_cdt_ctx *ctx, as_val *begin, as_val *end, as_list_return_type return_type)
 
AS_EXTERN bool as_operations_list_get_by_value_rel_rank_range (as_operations *ops, const char *name, as_cdt_ctx *ctx, as_val *value, int64_t rank, uint64_t count, as_list_return_type return_type)
 
AS_EXTERN bool as_operations_list_get_by_value_rel_rank_range_to_end (as_operations *ops, const char *name, as_cdt_ctx *ctx, as_val *value, int64_t rank, as_list_return_type return_type)
 
AS_EXTERN bool as_operations_list_get_range (as_operations *ops, const char *name, as_cdt_ctx *ctx, int64_t index, uint64_t count)
 
AS_EXTERN bool as_operations_list_get_range_from (as_operations *ops, const char *name, as_cdt_ctx *ctx, int64_t index)
 
AS_EXTERN bool as_operations_list_increment (as_operations *ops, const char *name, as_cdt_ctx *ctx, as_list_policy *policy, int64_t index, as_val *incr)
 
AS_EXTERN bool as_operations_list_insert (as_operations *ops, const char *name, as_cdt_ctx *ctx, as_list_policy *policy, int64_t index, as_val *val)
 
AS_EXTERN bool as_operations_list_insert_items (as_operations *ops, const char *name, as_cdt_ctx *ctx, as_list_policy *policy, int64_t index, as_list *list)
 
AS_EXTERN bool as_operations_list_pop (as_operations *ops, const char *name, as_cdt_ctx *ctx, int64_t index)
 
AS_EXTERN bool as_operations_list_pop_range (as_operations *ops, const char *name, as_cdt_ctx *ctx, int64_t index, uint64_t count)
 
AS_EXTERN bool as_operations_list_pop_range_from (as_operations *ops, const char *name, as_cdt_ctx *ctx, int64_t index)
 
AS_EXTERN bool as_operations_list_remove (as_operations *ops, const char *name, as_cdt_ctx *ctx, int64_t index)
 
AS_EXTERN bool as_operations_list_remove_by_index (as_operations *ops, const char *name, as_cdt_ctx *ctx, int64_t index, as_list_return_type return_type)
 
AS_EXTERN bool as_operations_list_remove_by_index_range (as_operations *ops, const char *name, as_cdt_ctx *ctx, int64_t index, uint64_t count, as_list_return_type return_type)
 
AS_EXTERN bool as_operations_list_remove_by_index_range_to_end (as_operations *ops, const char *name, as_cdt_ctx *ctx, int64_t index, as_list_return_type return_type)
 
AS_EXTERN bool as_operations_list_remove_by_rank (as_operations *ops, const char *name, as_cdt_ctx *ctx, int64_t rank, as_list_return_type return_type)
 
AS_EXTERN bool as_operations_list_remove_by_rank_range (as_operations *ops, const char *name, as_cdt_ctx *ctx, int64_t rank, uint64_t count, as_list_return_type return_type)
 
AS_EXTERN bool as_operations_list_remove_by_rank_range_to_end (as_operations *ops, const char *name, as_cdt_ctx *ctx, int64_t rank, as_list_return_type return_type)
 
AS_EXTERN bool as_operations_list_remove_by_value (as_operations *ops, const char *name, as_cdt_ctx *ctx, as_val *value, as_list_return_type return_type)
 
AS_EXTERN bool as_operations_list_remove_by_value_list (as_operations *ops, const char *name, as_cdt_ctx *ctx, as_list *values, as_list_return_type return_type)
 
AS_EXTERN bool as_operations_list_remove_by_value_range (as_operations *ops, const char *name, as_cdt_ctx *ctx, as_val *begin, as_val *end, as_list_return_type return_type)
 
AS_EXTERN bool as_operations_list_remove_by_value_rel_rank_range (as_operations *ops, const char *name, as_cdt_ctx *ctx, as_val *value, int64_t rank, uint64_t count, as_list_return_type return_type)
 
AS_EXTERN bool as_operations_list_remove_by_value_rel_rank_range_to_end (as_operations *ops, const char *name, as_cdt_ctx *ctx, as_val *value, int64_t rank, as_list_return_type return_type)
 
AS_EXTERN bool as_operations_list_remove_range (as_operations *ops, const char *name, as_cdt_ctx *ctx, int64_t index, uint64_t count)
 
AS_EXTERN bool as_operations_list_remove_range_from (as_operations *ops, const char *name, as_cdt_ctx *ctx, int64_t index)
 
AS_EXTERN bool as_operations_list_set (as_operations *ops, const char *name, as_cdt_ctx *ctx, as_list_policy *policy, int64_t index, as_val *val)
 
AS_EXTERN bool as_operations_list_set_order (as_operations *ops, const char *name, as_cdt_ctx *ctx, as_list_order order)
 
AS_EXTERN bool as_operations_list_size (as_operations *ops, const char *name, as_cdt_ctx *ctx)
 
AS_EXTERN bool as_operations_list_sort (as_operations *ops, const char *name, as_cdt_ctx *ctx, as_list_sort_flags flags)
 
AS_EXTERN bool as_operations_list_trim (as_operations *ops, const char *name, as_cdt_ctx *ctx, int64_t index, uint64_t count)
 

Enumeration Type Documentation

◆ as_list_order

List storage order.

Enumerator
AS_LIST_UNORDERED 

List is not ordered. This is the default.

AS_LIST_ORDERED 

List is ordered.

Definition at line 34 of file as_cdt_order.h.

◆ as_list_return_type

List return type. Type of data to return when selecting or removing items from the list.

Enumerator
AS_LIST_RETURN_NONE 

Do not return a result.

AS_LIST_RETURN_INDEX 

Return key index order.

AS_LIST_RETURN_REVERSE_INDEX 

Return reverse key order.

AS_LIST_RETURN_RANK 

Return value order.

AS_LIST_RETURN_REVERSE_RANK 

Return reverse value order.

AS_LIST_RETURN_COUNT 

Return count of items selected.

AS_LIST_RETURN_VALUE 

Return value for single key read and value list for range read.

AS_LIST_RETURN_EXISTS 

Return true if count > 0.

AS_LIST_RETURN_INVERTED 

Invert meaning of list command and return values. For example:

as_operations_inita(&ops, 1);
as_operations_add_list_remove_by_index_range(&ops, BIN_NAME, index, count,
as_record* rec = NULL;
as_status status = aerospike_key_operate(as, &err, NULL, &key, &ops, &rec);
as_operations_destroy(&ops);
as_status
Definition as_status.h:30
static bool as_operations_add_list_remove_by_index_range(as_operations *ops, const char *name, int64_t index, uint64_t count, as_list_return_type return_type)
@ AS_LIST_RETURN_VALUE
@ AS_LIST_RETURN_INVERTED

With AS_LIST_RETURN_INVERTED enabled, the items outside of the specified index range will be removed and returned.

Definition at line 162 of file as_list_operations.h.

◆ as_list_sort_flags

List sort flags.

Enumerator
AS_LIST_SORT_DEFAULT 

Default. Preserve duplicate values when sorting list.

AS_LIST_SORT_DROP_DUPLICATES 

Drop duplicate values when sorting list.

Definition at line 101 of file as_list_operations.h.

◆ as_list_write_flags

List write bit flags.

Enumerator
AS_LIST_WRITE_DEFAULT 

Default. Allow duplicate values and insertions at any index.

AS_LIST_WRITE_ADD_UNIQUE 

Only add unique values.

AS_LIST_WRITE_INSERT_BOUNDED 

Enforce list boundaries when inserting. Do not allow values to be inserted at index outside current list boundaries.

AS_LIST_WRITE_NO_FAIL 

Do not raise error if a list item fails due to write flag constraints.

AS_LIST_WRITE_PARTIAL 

Allow other valid list items to be committed if a list item fails due to write flag constraints.

Definition at line 118 of file as_list_operations.h.

Function Documentation

◆ as_list_policy_init()

static void as_list_policy_init ( as_list_policy * policy)
inlinestatic

Initialize list attributes to default unordered list with standard overwrite semantics.

Definition at line 274 of file as_list_operations.h.

References AS_LIST_UNORDERED, AS_LIST_WRITE_DEFAULT, as_list_policy::flags, and as_list_policy::order.

◆ as_list_policy_set()

static void as_list_policy_set ( as_list_policy * policy,
as_list_order order,
as_list_write_flags flags )
inlinestatic

Set list attributes to specified list order and write flag semantics.

Definition at line 286 of file as_list_operations.h.

References as_list_policy::flags, and as_list_policy::order.

◆ as_operations_add_list_append()

static bool as_operations_add_list_append ( as_operations * ops,
const char * name,
as_val * val )
inlinestatic

Create list append operation. Server appends value to list bin. Server returns list size.

Definition at line 942 of file as_list_operations.h.

References as_operations_list_append().

◆ as_operations_add_list_append_double()

static bool as_operations_add_list_append_double ( as_operations * ops,
const char * name,
double value )
inlinestatic

Create list append operation. Server appends double to list bin. Server returns list size.

Definition at line 985 of file as_list_operations.h.

References as_double_init(), and as_operations_list_append().

◆ as_operations_add_list_append_int64()

static bool as_operations_add_list_append_int64 ( as_operations * ops,
const char * name,
int64_t value )
inlinestatic

Create list append operation. Server appends integer to list bin. Server returns list size.

Definition at line 970 of file as_list_operations.h.

References as_integer_init(), and as_operations_list_append().

◆ as_operations_add_list_append_items()

static bool as_operations_add_list_append_items ( as_operations * ops,
const char * name,
as_list * list )
inlinestatic

Create list append items operation. Server appends each input list item to end of list bin. Server returns list size.

Definition at line 1070 of file as_list_operations.h.

References as_operations_list_append_items().

◆ as_operations_add_list_append_items_with_policy()

static bool as_operations_add_list_append_items_with_policy ( as_operations * ops,
const char * name,
as_list_policy * policy,
as_list * list )
inlinestatic

Create list append items operation with policy. Server appends each input list item to end of list bin. Server returns list size.

Definition at line 1083 of file as_list_operations.h.

References as_operations_list_append_items().

◆ as_operations_add_list_append_raw()

static bool as_operations_add_list_append_raw ( as_operations * ops,
const char * name,
const uint8_t * value,
uint32_t size )
inlinestatic

Create list append operation. Server appends blob (byte array) to list bin. Server returns list size.

The value will not be freed when the operations are destroyed.

Definition at line 1055 of file as_list_operations.h.

References as_operations_add_list_append_rawp().

◆ as_operations_add_list_append_rawp()

static bool as_operations_add_list_append_rawp ( as_operations * ops,
const char * name,
const uint8_t * value,
uint32_t size,
bool free )
inlinestatic

Create list append operation. Server appends blob (byte array) to list bin. Server returns list size.

If free is true, the value will be freed when the operations are destroyed.

Definition at line 1036 of file as_list_operations.h.

References as_bytes_init_wrap(), and as_operations_list_append().

◆ as_operations_add_list_append_str()

static bool as_operations_add_list_append_str ( as_operations * ops,
const char * name,
const char * value )
inlinestatic

Create list append operation. Server appends string to list bin. Server returns list size.

The value will not be freed when the operations are destroyed.

Definition at line 1021 of file as_list_operations.h.

References as_operations_add_list_append_strp().

◆ as_operations_add_list_append_strp()

static bool as_operations_add_list_append_strp ( as_operations * ops,
const char * name,
const char * value,
bool free )
inlinestatic

Create list append operation. Server appends string to list bin. Server returns list size.

If free is true, the value will be freed when the operations are destroyed.

Definition at line 1002 of file as_list_operations.h.

References as_operations_list_append(), and as_string_init().

◆ as_operations_add_list_append_with_policy()

static bool as_operations_add_list_append_with_policy ( as_operations * ops,
const char * name,
as_list_policy * policy,
as_val * val )
inlinestatic

Create list append operation with policy. Server appends value to list bin. Server returns list size.

Definition at line 955 of file as_list_operations.h.

References as_operations_list_append().

◆ as_operations_add_list_clear()

static bool as_operations_add_list_clear ( as_operations * ops,
const char * name )
inlinestatic

Create list clear operation. Server removes all items in list bin. Server does not return a result by default.

Definition at line 1718 of file as_list_operations.h.

References as_operations_list_clear().

◆ as_operations_add_list_get()

static bool as_operations_add_list_get ( as_operations * ops,
const char * name,
int64_t index )
inlinestatic

Create list get operation. Server returns item at specified index in list bin.

Definition at line 1745 of file as_list_operations.h.

References as_operations_list_get().

◆ as_operations_add_list_get_by_index()

static bool as_operations_add_list_get_by_index ( as_operations * ops,
const char * name,
int64_t index,
as_list_return_type return_type )
inlinestatic

Create list get by index operation. Server selects list item identified by index and returns selected data specified by return_type.

Definition at line 1886 of file as_list_operations.h.

References as_operations_list_get_by_index().

◆ as_operations_add_list_get_by_index_range()

static bool as_operations_add_list_get_by_index_range ( as_operations * ops,
const char * name,
int64_t index,
uint64_t count,
as_list_return_type return_type )
inlinestatic

Create list get by index range operation. Server selects count list items starting at specified index and returns selected data specified by return_type.

Definition at line 1916 of file as_list_operations.h.

References as_operations_list_get_by_index_range().

◆ as_operations_add_list_get_by_index_range_to_end()

static bool as_operations_add_list_get_by_index_range_to_end ( as_operations * ops,
const char * name,
int64_t index,
as_list_return_type return_type )
inlinestatic

Create list get by index range operation. Server selects list items starting at specified index to the end of list and returns selected data specified by return_type.

Definition at line 1901 of file as_list_operations.h.

References as_operations_list_get_by_index_range_to_end().

◆ as_operations_add_list_get_by_rank()

static bool as_operations_add_list_get_by_rank ( as_operations * ops,
const char * name,
int64_t rank,
as_list_return_type return_type )
inlinestatic

Create list get by rank operation. Server selects list item identified by rank and returns selected data specified by return_type.

Definition at line 1931 of file as_list_operations.h.

References as_operations_list_get_by_rank().

◆ as_operations_add_list_get_by_rank_range()

static bool as_operations_add_list_get_by_rank_range ( as_operations * ops,
const char * name,
int64_t rank,
uint64_t count,
as_list_return_type return_type )
inlinestatic

Create list get by rank range operation. Server selects count list items starting at specified rank and returns selected data specified by return_type.

Definition at line 1961 of file as_list_operations.h.

References as_operations_list_get_by_rank_range().

◆ as_operations_add_list_get_by_rank_range_to_end()

static bool as_operations_add_list_get_by_rank_range_to_end ( as_operations * ops,
const char * name,
int64_t rank,
as_list_return_type return_type )
inlinestatic

Create list get by rank range operation. Server selects list items starting at specified rank to the last ranked item and returns selected data specified by return_type.

Definition at line 1946 of file as_list_operations.h.

References as_operations_list_get_by_rank_range_to_end().

◆ as_operations_add_list_get_by_value()

static bool as_operations_add_list_get_by_value ( as_operations * ops,
const char * name,
as_val * value,
as_list_return_type return_type )
inlinestatic

Create list get by value operation. Server selects list items identified by value and returns selected data specified by return_type.

Definition at line 1783 of file as_list_operations.h.

References as_operations_list_get_by_value().

◆ as_operations_add_list_get_by_value_list()

static bool as_operations_add_list_get_by_value_list ( as_operations * ops,
const char * name,
as_list * values,
as_list_return_type return_type )
inlinestatic

Create list get by value list operation. Server selects list items identified by values and returns selected data specified by return_type.

Definition at line 1816 of file as_list_operations.h.

References as_operations_list_get_by_value_list().

◆ as_operations_add_list_get_by_value_range()

static bool as_operations_add_list_get_by_value_range ( as_operations * ops,
const char * name,
as_val * begin,
as_val * end,
as_list_return_type return_type )
inlinestatic

Create list get by value range operation. Server selects list items identified by value range (begin inclusive, end exclusive). If begin is null, the range is less than end. If end is null, the range is greater than equal to begin.

Server returns selected data specified by return_type.

Definition at line 1801 of file as_list_operations.h.

References as_operations_list_get_by_value_range().

◆ as_operations_add_list_get_by_value_rel_rank_range()

static bool as_operations_add_list_get_by_value_rel_rank_range ( as_operations * ops,
const char * name,
as_val * value,
int64_t rank,
uint64_t count,
as_list_return_type return_type )
inlinestatic

Create list get by value relative to rank range operation. Server selects list items nearest to value and greater by relative rank with a count limit. Server returns selected data specified by return_type.

Examples for ordered list [0,4,5,9,11,15]:

  • (value,rank,count) = [selected items]
  • (5,0,2) = [5,9]
  • (5,1,1) = [9]
  • (5,-1,2) = [4,5]
  • (3,0,1) = [4]
  • (3,3,7) = [11,15]
  • (3,-3,2) = []

Definition at line 1870 of file as_list_operations.h.

References as_operations_list_get_by_value_rel_rank_range().

◆ as_operations_add_list_get_by_value_rel_rank_range_to_end()

static bool as_operations_add_list_get_by_value_rel_rank_range_to_end ( as_operations * ops,
const char * name,
as_val * value,
int64_t rank,
as_list_return_type return_type )
inlinestatic

Create list get by value relative to rank range operation. Server selects list items nearest to value and greater by relative rank. Server returns selected data specified by return_type.

Examples for ordered list [0,4,5,9,11,15]:

  • (value,rank) = [selected items]
  • (5,0) = [5,9,11,15]
  • (5,1) = [9,11,15]
  • (5,-1) = [4,5,9,11,15]
  • (3,0) = [4,5,9,11,15]
  • (3,3) = [11,15]
  • (3,-3) = [0,4,5,9,11,15]

Definition at line 1842 of file as_list_operations.h.

References as_operations_list_get_by_value_rel_rank_range_to_end().

◆ as_operations_add_list_get_range()

static bool as_operations_add_list_get_range ( as_operations * ops,
const char * name,
int64_t index,
uint64_t count )
inlinestatic

Create list get range operation. Server returns "count" items starting at specified index in list bin.

Definition at line 1757 of file as_list_operations.h.

References as_operations_list_get_range().

◆ as_operations_add_list_get_range_from()

static bool as_operations_add_list_get_range_from ( as_operations * ops,
const char * name,
int64_t index )
inlinestatic

Create list get range operation. Server returns items starting at index to the end of list.

Definition at line 1771 of file as_list_operations.h.

References as_operations_list_get_range_from().

◆ as_operations_add_list_increment()

static bool as_operations_add_list_increment ( as_operations * ops,
const char * name,
int64_t index,
as_val * incr )
inlinestatic

Create list increment operation. Server increments value at index by incr and returns final result. Valid only for numbers.

Definition at line 1266 of file as_list_operations.h.

References as_operations_list_increment().

◆ as_operations_add_list_increment_with_policy()

static bool as_operations_add_list_increment_with_policy ( as_operations * ops,
const char * name,
as_list_policy * policy,
int64_t index,
as_val * incr )
inlinestatic

Create list increment operation with policy. Server increments value at index by incr and returns final result. Valid only for numbers.

Definition at line 1281 of file as_list_operations.h.

References as_operations_list_increment().

◆ as_operations_add_list_insert()

static bool as_operations_add_list_insert ( as_operations * ops,
const char * name,
int64_t index,
as_val * val )
inlinestatic

Create default list insert operation. Server inserts value to specified index of list bin. Server returns list size.

Definition at line 1098 of file as_list_operations.h.

References as_operations_list_insert().

◆ as_operations_add_list_insert_double()

static bool as_operations_add_list_insert_double ( as_operations * ops,
const char * name,
int64_t index,
double value )
inlinestatic

Create default list insert operation with policy. Server inserts double to specified index of list bin. Server returns list size.

Definition at line 1145 of file as_list_operations.h.

References as_double_init(), and as_operations_list_insert().

◆ as_operations_add_list_insert_int64()

static bool as_operations_add_list_insert_int64 ( as_operations * ops,
const char * name,
int64_t index,
int64_t value )
inlinestatic

Create default list insert operation with policy. Server inserts integer to specified index of list bin. Server returns list size.

Definition at line 1128 of file as_list_operations.h.

References as_integer_init(), and as_operations_list_insert().

◆ as_operations_add_list_insert_items()

static bool as_operations_add_list_insert_items ( as_operations * ops,
const char * name,
int64_t index,
as_list * list )
inlinestatic

Create default list insert items operation. Server inserts each input list item starting at specified index of list bin. Server returns list size.

Definition at line 1235 of file as_list_operations.h.

References as_operations_list_insert_items().

◆ as_operations_add_list_insert_items_with_policy()

static bool as_operations_add_list_insert_items_with_policy ( as_operations * ops,
const char * name,
as_list_policy * policy,
int64_t index,
as_list * list )
inlinestatic

Create default list insert items operation with policy. Server inserts each input list item starting at specified index of list bin. Server returns list size.

Definition at line 1250 of file as_list_operations.h.

References as_operations_list_insert_items().

◆ as_operations_add_list_insert_raw()

static bool as_operations_add_list_insert_raw ( as_operations * ops,
const char * name,
int64_t index,
const uint8_t * value,
uint32_t size )
inlinestatic

Create default list insert operation with policy. Server inserts blob (byte array) to specified index of list bin. Server returns list size.

The value will not be freed when the operations are destroyed.

Definition at line 1220 of file as_list_operations.h.

References as_operations_add_list_insert_rawp().

◆ as_operations_add_list_insert_rawp()

static bool as_operations_add_list_insert_rawp ( as_operations * ops,
const char * name,
int64_t index,
const uint8_t * value,
uint32_t size,
bool free )
inlinestatic

Create default list insert operation with policy. Server inserts blob (byte array) to specified index of list bin. Server returns list size.

If free is true, the value will be freed when the operations are destroyed.

Definition at line 1200 of file as_list_operations.h.

References as_bytes_init_wrap(), and as_operations_list_insert().

◆ as_operations_add_list_insert_str()

static bool as_operations_add_list_insert_str ( as_operations * ops,
const char * name,
int64_t index,
const char * value )
inlinestatic

Create default list insert operation with policy. Server inserts string to specified index of list bin. Server returns list size.

The value will not be freed when the operations are destroyed.

Definition at line 1183 of file as_list_operations.h.

References as_operations_add_list_insert_strp().

◆ as_operations_add_list_insert_strp()

static bool as_operations_add_list_insert_strp ( as_operations * ops,
const char * name,
int64_t index,
const char * value,
bool free )
inlinestatic

Create default list insert operation with policy. Server inserts string to specified index of list bin. Server returns list size.

If free is true, the value will be freed when the operations are destroyed.

Definition at line 1164 of file as_list_operations.h.

References as_operations_list_insert(), and as_string_init().

◆ as_operations_add_list_insert_with_policy()

static bool as_operations_add_list_insert_with_policy ( as_operations * ops,
const char * name,
as_list_policy * policy,
int64_t index,
as_val * val )
inlinestatic

Create default list insert operation with policy. Server inserts value to specified index of list bin. Server returns list size.

Definition at line 1113 of file as_list_operations.h.

References as_operations_list_insert().

◆ as_operations_add_list_pop()

static bool as_operations_add_list_pop ( as_operations * ops,
const char * name,
int64_t index )
inlinestatic

Create list pop operation. Server returns item at specified index and removes item from list bin.

Definition at line 1430 of file as_list_operations.h.

References as_operations_list_pop().

◆ as_operations_add_list_pop_range()

static bool as_operations_add_list_pop_range ( as_operations * ops,
const char * name,
int64_t index,
uint64_t count )
inlinestatic

Create list pop range operation. Server returns "count" items starting at specified index and removes items from list bin.

Definition at line 1442 of file as_list_operations.h.

References as_operations_list_pop_range().

◆ as_operations_add_list_pop_range_from()

static bool as_operations_add_list_pop_range_from ( as_operations * ops,
const char * name,
int64_t index )
inlinestatic

Create list pop range operation. Server returns items starting at specified index to the end of list and removes those items from list bin.

Definition at line 1457 of file as_list_operations.h.

References as_operations_list_pop_range_from().

◆ as_operations_add_list_remove()

static bool as_operations_add_list_remove ( as_operations * ops,
const char * name,
int64_t index )
inlinestatic

Create list remove operation. Server removes item at specified index from list bin. Server returns number of items removed.

Definition at line 1470 of file as_list_operations.h.

References as_operations_list_remove().

◆ as_operations_add_list_remove_by_index()

static bool as_operations_add_list_remove_by_index ( as_operations * ops,
const char * name,
int64_t index,
as_list_return_type return_type )
inlinestatic

Create list remove operation. Server removes list item identified by index and returns removed data specified by return_type.

Definition at line 1613 of file as_list_operations.h.

References as_operations_list_remove_by_index().

◆ as_operations_add_list_remove_by_index_range()

static bool as_operations_add_list_remove_by_index_range ( as_operations * ops,
const char * name,
int64_t index,
uint64_t count,
as_list_return_type return_type )
inlinestatic

Create list remove operation. Server removes count list items starting at specified index and returns removed data specified by return_type.

Definition at line 1642 of file as_list_operations.h.

References as_operations_list_remove_by_index_range().

◆ as_operations_add_list_remove_by_index_range_to_end()

static bool as_operations_add_list_remove_by_index_range_to_end ( as_operations * ops,
const char * name,
int64_t index,
as_list_return_type return_type )
inlinestatic

Create list remove operation. Server removes list items starting at specified index to the end of list and returns removed data specified by return_type.

Definition at line 1628 of file as_list_operations.h.

References as_operations_list_remove_by_index_range_to_end().

◆ as_operations_add_list_remove_by_rank()

static bool as_operations_add_list_remove_by_rank ( as_operations * ops,
const char * name,
int64_t rank,
as_list_return_type return_type )
inlinestatic

Create list remove operation. Server removes list item identified by rank and returns removed data specified by return_type.

Definition at line 1657 of file as_list_operations.h.

References as_operations_list_remove_by_rank().

◆ as_operations_add_list_remove_by_rank_range()

static bool as_operations_add_list_remove_by_rank_range ( as_operations * ops,
const char * name,
int64_t rank,
uint64_t count,
as_list_return_type return_type )
inlinestatic

Create list remove operation. Server removes count list items starting at specified rank and returns removed data specified by return_type.

Definition at line 1686 of file as_list_operations.h.

References as_operations_list_remove_by_rank_range().

◆ as_operations_add_list_remove_by_rank_range_to_end()

static bool as_operations_add_list_remove_by_rank_range_to_end ( as_operations * ops,
const char * name,
int64_t rank,
as_list_return_type return_type )
inlinestatic

Create list remove operation. Server removes list items starting at specified rank to the last ranked item and returns removed data specified by return_type.

Definition at line 1672 of file as_list_operations.h.

References as_operations_list_remove_by_rank_range_to_end().

◆ as_operations_add_list_remove_by_value()

static bool as_operations_add_list_remove_by_value ( as_operations * ops,
const char * name,
as_val * value,
as_list_return_type return_type )
inlinestatic

Create list remove operation. Server removes list items identified by value and returns removed data specified by return_type.

Definition at line 1510 of file as_list_operations.h.

References as_operations_list_remove_by_value().

◆ as_operations_add_list_remove_by_value_list()

static bool as_operations_add_list_remove_by_value_list ( as_operations * ops,
const char * name,
as_list * values,
as_list_return_type return_type )
inlinestatic

Create list remove operation. Server removes list items identified by values and returns removed data specified by return_type.

Definition at line 1524 of file as_list_operations.h.

References as_operations_list_remove_by_value_list().

◆ as_operations_add_list_remove_by_value_range()

static bool as_operations_add_list_remove_by_value_range ( as_operations * ops,
const char * name,
as_val * begin,
as_val * end,
as_list_return_type return_type )
inlinestatic

Create list remove operation. Server removes list items identified by value range (begin inclusive, end exclusive). If begin is null, the range is less than end. If end is null, the range is greater than equal to begin.

Server returns removed data specified by return_type.

Definition at line 1542 of file as_list_operations.h.

References as_operations_list_remove_by_value_range().

◆ as_operations_add_list_remove_by_value_rel_rank_range()

static bool as_operations_add_list_remove_by_value_rel_rank_range ( as_operations * ops,
const char * name,
as_val * value,
int64_t rank,
uint64_t count,
as_list_return_type return_type )
inlinestatic

Create list remove by value relative to rank range operation. Server removes list items nearest to value and greater by relative rank with a count limit. Server returns removed data specified by return_type.

Examples for ordered list [0,4,5,9,11,15]:

  • (value,rank,count) = [removed items]
  • (5,0,2) = [5,9]
  • (5,1,1) = [9]
  • (5,-1,2) = [4,5]
  • (3,0,1) = [4]
  • (3,3,7) = [11,15]
  • (3,-3,2) = []

Definition at line 1597 of file as_list_operations.h.

References as_operations_list_remove_by_value_rel_rank_range().

◆ as_operations_add_list_remove_by_value_rel_rank_range_to_end()

static bool as_operations_add_list_remove_by_value_rel_rank_range_to_end ( as_operations * ops,
const char * name,
as_val * value,
int64_t rank,
as_list_return_type return_type )
inlinestatic

Create list remove by value relative to rank range operation. Server removes list items nearest to value and greater by relative rank. Server returns removed data specified by return_type.

Examples for ordered list [0,4,5,9,11,15]:

  • (value,rank) = [removed items]
  • (5,0) = [5,9,11,15]
  • (5,1) = [9,11,15]
  • (5,-1) = [4,5,9,11,15]
  • (3,0) = [4,5,9,11,15]
  • (3,3) = [11,15]
  • (3,-3) = [0,4,5,9,11,15]

Definition at line 1569 of file as_list_operations.h.

References as_operations_list_remove_by_value_rel_rank_range_to_end().

◆ as_operations_add_list_remove_range()

static bool as_operations_add_list_remove_range ( as_operations * ops,
const char * name,
int64_t index,
uint64_t count )
inlinestatic

Create list remove range operation. Server removes "count" items starting at specified index from list bin. Server returns number of items removed.

Definition at line 1483 of file as_list_operations.h.

References as_operations_list_remove_range().

◆ as_operations_add_list_remove_range_from()

static bool as_operations_add_list_remove_range_from ( as_operations * ops,
const char * name,
int64_t index )
inlinestatic

Create list remove range operation. Server removes items starting at specified index to the end of list. Server returns number of items removed.

Definition at line 1498 of file as_list_operations.h.

References as_operations_list_remove_range_from().

◆ as_operations_add_list_set()

static bool as_operations_add_list_set ( as_operations * ops,
const char * name,
int64_t index,
as_val * val )
inlinestatic

Create list set operation. Server sets item value at specified index in list bin. Server does not return a result by default.

Definition at line 1296 of file as_list_operations.h.

References as_operations_list_set().

◆ as_operations_add_list_set_double()

static bool as_operations_add_list_set_double ( as_operations * ops,
const char * name,
int64_t index,
double value )
inlinestatic

Create list set operation with policy. Server sets double at specified index in list bin. Server does not return a result by default.

Definition at line 1341 of file as_list_operations.h.

References as_double_init(), and as_operations_list_set().

◆ as_operations_add_list_set_int64()

static bool as_operations_add_list_set_int64 ( as_operations * ops,
const char * name,
int64_t index,
int64_t value )
inlinestatic

Create list set operation with policy. Server sets integer at specified index in list bin. Server does not return a result by default.

Definition at line 1324 of file as_list_operations.h.

References as_integer_init(), and as_operations_list_set().

◆ as_operations_add_list_set_order()

static bool as_operations_add_list_set_order ( as_operations * ops,
const char * name,
as_list_order order )
inlinestatic

Create set list order operation. Server sets list order. Server returns null.

Definition at line 915 of file as_list_operations.h.

References as_operations_list_set_order().

◆ as_operations_add_list_set_raw()

static bool as_operations_add_list_set_raw ( as_operations * ops,
const char * name,
int64_t index,
const uint8_t * value,
uint32_t size )
inlinestatic

Create list set operation with policy. Server sets blob (byte array) at specified index in list bin. Server does not return a result by default.

The value will not be freed when the operations are destroyed.

Definition at line 1416 of file as_list_operations.h.

References as_operations_add_list_set_rawp().

◆ as_operations_add_list_set_rawp()

static bool as_operations_add_list_set_rawp ( as_operations * ops,
const char * name,
int64_t index,
const uint8_t * value,
uint32_t size,
bool free )
inlinestatic

Create list set operation with policy. Server sets blob (byte array) at specified index in list bin. Server does not return a result by default.

If free is true, the value will be freed when the operations are destroyed.

Definition at line 1396 of file as_list_operations.h.

References as_bytes_init_wrap(), and as_operations_list_set().

◆ as_operations_add_list_set_str()

static bool as_operations_add_list_set_str ( as_operations * ops,
const char * name,
int64_t index,
const char * value )
inlinestatic

Create list set operation with policy. Server sets string at specified index in list bin. Server does not return a result by default.

The value will not be freed when the operations are destroyed.

Definition at line 1379 of file as_list_operations.h.

References as_operations_add_list_set_strp().

◆ as_operations_add_list_set_strp()

static bool as_operations_add_list_set_strp ( as_operations * ops,
const char * name,
int64_t index,
const char * value,
bool free )
inlinestatic

Create list set operation with policy. Server sets string at specified index in list bin. Server does not return a result by default.

If free is true, the value will be freed when the operations are destroyed.

Definition at line 1360 of file as_list_operations.h.

References as_operations_list_set(), and as_string_init().

◆ as_operations_add_list_set_with_policy()

static bool as_operations_add_list_set_with_policy ( as_operations * ops,
const char * name,
as_list_policy * policy,
int64_t index,
as_val * val )
inlinestatic

Create list set operation with policy. Server sets item value at specified index in list bin. Server does not return a result by default.

Definition at line 1309 of file as_list_operations.h.

References as_operations_list_set().

◆ as_operations_add_list_size()

static bool as_operations_add_list_size ( as_operations * ops,
const char * name )
inlinestatic

Create list size operation. Server returns size of list.

Definition at line 1733 of file as_list_operations.h.

References as_operations_list_size().

◆ as_operations_add_list_sort()

static bool as_operations_add_list_sort ( as_operations * ops,
const char * name,
as_list_sort_flags flags )
inlinestatic

Create list sort operation. Server sorts list according to flags. Server does not return a result by default.

Returns
true on success. Otherwise an error occurred.

Definition at line 929 of file as_list_operations.h.

References as_operations_list_sort().

◆ as_operations_add_list_trim()

static bool as_operations_add_list_trim ( as_operations * ops,
const char * name,
int64_t index,
uint64_t count )
inlinestatic

Create list trim operation. Server removes items in list bin that do not fall into range specified by index and count range. If the range is out of bounds, then all items will be removed. Server returns list size after trim.

Definition at line 1703 of file as_list_operations.h.

References as_operations_list_trim().

◆ as_operations_list_append()

AS_EXTERN bool as_operations_list_append ( as_operations * ops,
const char * name,
as_cdt_ctx * ctx,
as_list_policy * policy,
as_val * val )

Create list append operation with policy. Server appends value to list bin. Server returns list size.

This function takes ownership and frees heap memory associated with val parameter.

◆ as_operations_list_append_items()

AS_EXTERN bool as_operations_list_append_items ( as_operations * ops,
const char * name,
as_cdt_ctx * ctx,
as_list_policy * policy,
as_list * list )

Create list append items operation with policy. Server appends each input list item to end of list bin. Server returns list size.

This function takes ownership and frees heap memory associated with list parameter.

◆ as_operations_list_clear()

AS_EXTERN bool as_operations_list_clear ( as_operations * ops,
const char * name,
as_cdt_ctx * ctx )

Create list clear operation. Server removes all items in list bin. Server does not return a result by default.

◆ as_operations_list_create()

AS_EXTERN bool as_operations_list_create ( as_operations * ops,
const char * name,
as_cdt_ctx * ctx,
as_list_order order,
bool pad )

Create list create operation. Server creates list at given context level. The context is allowed to be beyond list boundaries only if pad is set to true. In that case, nil list entries will be inserted to satisfy the context position.

◆ as_operations_list_get()

AS_EXTERN bool as_operations_list_get ( as_operations * ops,
const char * name,
as_cdt_ctx * ctx,
int64_t index )

Create list get operation. Server returns item at specified index in list bin.

◆ as_operations_list_get_by_index()

AS_EXTERN bool as_operations_list_get_by_index ( as_operations * ops,
const char * name,
as_cdt_ctx * ctx,
int64_t index,
as_list_return_type return_type )

Create list get by index operation. Server selects list item identified by index and returns selected data specified by return_type.

◆ as_operations_list_get_by_index_range()

AS_EXTERN bool as_operations_list_get_by_index_range ( as_operations * ops,
const char * name,
as_cdt_ctx * ctx,
int64_t index,
uint64_t count,
as_list_return_type return_type )

Create list get by index range operation. Server selects count list items starting at specified index and returns selected data specified by return_type.

◆ as_operations_list_get_by_index_range_to_end()

AS_EXTERN bool as_operations_list_get_by_index_range_to_end ( as_operations * ops,
const char * name,
as_cdt_ctx * ctx,
int64_t index,
as_list_return_type return_type )

Create list get by index range operation. Server selects list items starting at specified index to the end of list and returns selected data specified by return_type.

◆ as_operations_list_get_by_rank()

AS_EXTERN bool as_operations_list_get_by_rank ( as_operations * ops,
const char * name,
as_cdt_ctx * ctx,
int64_t rank,
as_list_return_type return_type )

Create list get by rank operation. Server selects list item identified by rank and returns selected data specified by return_type.

◆ as_operations_list_get_by_rank_range()

AS_EXTERN bool as_operations_list_get_by_rank_range ( as_operations * ops,
const char * name,
as_cdt_ctx * ctx,
int64_t rank,
uint64_t count,
as_list_return_type return_type )

Create list get by rank range operation. Server selects count list items starting at specified rank and returns selected data specified by return_type.

◆ as_operations_list_get_by_rank_range_to_end()

AS_EXTERN bool as_operations_list_get_by_rank_range_to_end ( as_operations * ops,
const char * name,
as_cdt_ctx * ctx,
int64_t rank,
as_list_return_type return_type )

Create list get by rank range operation. Server selects list items starting at specified rank to the last ranked item and returns selected data specified by return_type.

◆ as_operations_list_get_by_value()

AS_EXTERN bool as_operations_list_get_by_value ( as_operations * ops,
const char * name,
as_cdt_ctx * ctx,
as_val * value,
as_list_return_type return_type )

Create list get by value operation. Server selects list items identified by value and returns selected data specified by return_type.

This function takes ownership and frees heap memory associated with value parameter.

◆ as_operations_list_get_by_value_list()

AS_EXTERN bool as_operations_list_get_by_value_list ( as_operations * ops,
const char * name,
as_cdt_ctx * ctx,
as_list * values,
as_list_return_type return_type )

Create list get by value list operation. Server selects list items identified by values and returns selected data specified by return_type.

This function takes ownership and frees heap memory associated with values parameter.

◆ as_operations_list_get_by_value_range()

AS_EXTERN bool as_operations_list_get_by_value_range ( as_operations * ops,
const char * name,
as_cdt_ctx * ctx,
as_val * begin,
as_val * end,
as_list_return_type return_type )

Create list get by value range operation. Server selects list items identified by value range (begin inclusive, end exclusive). If begin is null, the range is less than end. If end is null, the range is greater than equal to begin.

Server returns selected data specified by return_type.

This function takes ownership and frees heap memory associated with begin/end parameters.

◆ as_operations_list_get_by_value_rel_rank_range()

AS_EXTERN bool as_operations_list_get_by_value_rel_rank_range ( as_operations * ops,
const char * name,
as_cdt_ctx * ctx,
as_val * value,
int64_t rank,
uint64_t count,
as_list_return_type return_type )

Create list get by value relative to rank range operation. Server selects list items nearest to value and greater by relative rank with a count limit. Server returns selected data specified by return_type.

Examples for ordered list [0,4,5,9,11,15]:

  • (value,rank,count) = [selected items]
  • (5,0,2) = [5,9]
  • (5,1,1) = [9]
  • (5,-1,2) = [4,5]
  • (3,0,1) = [4]
  • (3,3,7) = [11,15]
  • (3,-3,2) = []

This function takes ownership and frees heap memory associated with value parameter.

◆ as_operations_list_get_by_value_rel_rank_range_to_end()

AS_EXTERN bool as_operations_list_get_by_value_rel_rank_range_to_end ( as_operations * ops,
const char * name,
as_cdt_ctx * ctx,
as_val * value,
int64_t rank,
as_list_return_type return_type )

Create list get by value relative to rank range operation. Server selects list items nearest to value and greater by relative rank. Server returns selected data specified by return_type.

Examples for ordered list [0,4,5,9,11,15]:

  • (value,rank) = [selected items]
  • (5,0) = [5,9,11,15]
  • (5,1) = [9,11,15]
  • (5,-1) = [4,5,9,11,15]
  • (3,0) = [4,5,9,11,15]
  • (3,3) = [11,15]
  • (3,-3) = [0,4,5,9,11,15]

This function takes ownership and frees heap memory associated with value parameter.

◆ as_operations_list_get_range()

AS_EXTERN bool as_operations_list_get_range ( as_operations * ops,
const char * name,
as_cdt_ctx * ctx,
int64_t index,
uint64_t count )

Create list get range operation. Server returns "count" items starting at specified index in list bin.

◆ as_operations_list_get_range_from()

AS_EXTERN bool as_operations_list_get_range_from ( as_operations * ops,
const char * name,
as_cdt_ctx * ctx,
int64_t index )

Create list get range operation. Server returns items starting at index to the end of list.

◆ as_operations_list_increment()

AS_EXTERN bool as_operations_list_increment ( as_operations * ops,
const char * name,
as_cdt_ctx * ctx,
as_list_policy * policy,
int64_t index,
as_val * incr )

Create list increment operation with policy. Server increments value at index by incr and returns final result. Valid only for numbers.

This function takes ownership and frees heap memory associated with incr parameter.

◆ as_operations_list_insert()

AS_EXTERN bool as_operations_list_insert ( as_operations * ops,
const char * name,
as_cdt_ctx * ctx,
as_list_policy * policy,
int64_t index,
as_val * val )

Create default list insert operation with policy. Server inserts value to specified index of list bin. Server returns list size.

This function takes ownership and frees heap memory associated with val parameter.

◆ as_operations_list_insert_items()

AS_EXTERN bool as_operations_list_insert_items ( as_operations * ops,
const char * name,
as_cdt_ctx * ctx,
as_list_policy * policy,
int64_t index,
as_list * list )

Create default list insert items operation with policy. Server inserts each input list item starting at specified index of list bin. Server returns list size.

This function takes ownership and frees heap memory associated with list parameter.

◆ as_operations_list_pop()

AS_EXTERN bool as_operations_list_pop ( as_operations * ops,
const char * name,
as_cdt_ctx * ctx,
int64_t index )

Create list pop operation. Server returns item at specified index and removes item from list bin.

◆ as_operations_list_pop_range()

AS_EXTERN bool as_operations_list_pop_range ( as_operations * ops,
const char * name,
as_cdt_ctx * ctx,
int64_t index,
uint64_t count )

Create list pop range operation. Server returns "count" items starting at specified index and removes items from list bin.

◆ as_operations_list_pop_range_from()

AS_EXTERN bool as_operations_list_pop_range_from ( as_operations * ops,
const char * name,
as_cdt_ctx * ctx,
int64_t index )

Create list pop range operation. Server returns items starting at specified index to the end of list and removes those items from list bin.

◆ as_operations_list_remove()

AS_EXTERN bool as_operations_list_remove ( as_operations * ops,
const char * name,
as_cdt_ctx * ctx,
int64_t index )

Create list remove operation. Server removes item at specified index from list bin. Server returns number of items removed.

◆ as_operations_list_remove_by_index()

AS_EXTERN bool as_operations_list_remove_by_index ( as_operations * ops,
const char * name,
as_cdt_ctx * ctx,
int64_t index,
as_list_return_type return_type )

Create list remove operation. Server removes list item identified by index and returns removed data specified by return_type.

◆ as_operations_list_remove_by_index_range()

AS_EXTERN bool as_operations_list_remove_by_index_range ( as_operations * ops,
const char * name,
as_cdt_ctx * ctx,
int64_t index,
uint64_t count,
as_list_return_type return_type )

Create list remove operation. Server removes count list items starting at specified index and returns removed data specified by return_type.

◆ as_operations_list_remove_by_index_range_to_end()

AS_EXTERN bool as_operations_list_remove_by_index_range_to_end ( as_operations * ops,
const char * name,
as_cdt_ctx * ctx,
int64_t index,
as_list_return_type return_type )

Create list remove operation. Server removes list items starting at specified index to the end of list and returns removed data specified by return_type.

◆ as_operations_list_remove_by_rank()

AS_EXTERN bool as_operations_list_remove_by_rank ( as_operations * ops,
const char * name,
as_cdt_ctx * ctx,
int64_t rank,
as_list_return_type return_type )

Create list remove operation. Server removes list item identified by rank and returns removed data specified by return_type.

◆ as_operations_list_remove_by_rank_range()

AS_EXTERN bool as_operations_list_remove_by_rank_range ( as_operations * ops,
const char * name,
as_cdt_ctx * ctx,
int64_t rank,
uint64_t count,
as_list_return_type return_type )

Create list remove operation. Server removes count list items starting at specified rank and returns removed data specified by return_type.

◆ as_operations_list_remove_by_rank_range_to_end()

AS_EXTERN bool as_operations_list_remove_by_rank_range_to_end ( as_operations * ops,
const char * name,
as_cdt_ctx * ctx,
int64_t rank,
as_list_return_type return_type )

Create list remove operation. Server removes list items starting at specified rank to the last ranked item and returns removed data specified by return_type.

◆ as_operations_list_remove_by_value()

AS_EXTERN bool as_operations_list_remove_by_value ( as_operations * ops,
const char * name,
as_cdt_ctx * ctx,
as_val * value,
as_list_return_type return_type )

Create list remove operation. Server removes list items identified by value and returns removed data specified by return_type.

This function takes ownership and frees heap memory associated with value parameter.

◆ as_operations_list_remove_by_value_list()

AS_EXTERN bool as_operations_list_remove_by_value_list ( as_operations * ops,
const char * name,
as_cdt_ctx * ctx,
as_list * values,
as_list_return_type return_type )

Create list remove operation. Server removes list items identified by values and returns removed data specified by return_type.

This function takes ownership and frees heap memory associated with values parameter.

◆ as_operations_list_remove_by_value_range()

AS_EXTERN bool as_operations_list_remove_by_value_range ( as_operations * ops,
const char * name,
as_cdt_ctx * ctx,
as_val * begin,
as_val * end,
as_list_return_type return_type )

Create list remove operation. Server removes list items identified by value range (begin inclusive, end exclusive). If begin is null, the range is less than end. If end is null, the range is greater than equal to begin.

Server returns removed data specified by return_type.

This function takes ownership and frees heap memory associated with begin/end parameters.

◆ as_operations_list_remove_by_value_rel_rank_range()

AS_EXTERN bool as_operations_list_remove_by_value_rel_rank_range ( as_operations * ops,
const char * name,
as_cdt_ctx * ctx,
as_val * value,
int64_t rank,
uint64_t count,
as_list_return_type return_type )

Create list remove by value relative to rank range operation. Server removes list items nearest to value and greater by relative rank with a count limit. Server returns removed data specified by return_type.

Examples for ordered list [0,4,5,9,11,15]:

  • (value,rank,count) = [removed items]
  • (5,0,2) = [5,9]
  • (5,1,1) = [9]
  • (5,-1,2) = [4,5]
  • (3,0,1) = [4]
  • (3,3,7) = [11,15]
  • (3,-3,2) = []

This function takes ownership and frees heap memory associated with value parameter.

◆ as_operations_list_remove_by_value_rel_rank_range_to_end()

AS_EXTERN bool as_operations_list_remove_by_value_rel_rank_range_to_end ( as_operations * ops,
const char * name,
as_cdt_ctx * ctx,
as_val * value,
int64_t rank,
as_list_return_type return_type )

Create list remove by value relative to rank range operation. Server removes list items nearest to value and greater by relative rank. Server returns removed data specified by return_type.

Examples for ordered list [0,4,5,9,11,15]:

  • (value,rank) = [removed items]
  • (5,0) = [5,9,11,15]
  • (5,1) = [9,11,15]
  • (5,-1) = [4,5,9,11,15]
  • (3,0) = [4,5,9,11,15]
  • (3,3) = [11,15]
  • (3,-3) = [0,4,5,9,11,15]

This function takes ownership and frees heap memory associated with value parameter.

◆ as_operations_list_remove_range()

AS_EXTERN bool as_operations_list_remove_range ( as_operations * ops,
const char * name,
as_cdt_ctx * ctx,
int64_t index,
uint64_t count )

Create list remove range operation. Server removes "count" items starting at specified index from list bin. Server returns number of items removed.

◆ as_operations_list_remove_range_from()

AS_EXTERN bool as_operations_list_remove_range_from ( as_operations * ops,
const char * name,
as_cdt_ctx * ctx,
int64_t index )

Create list remove range operation. Server removes items starting at specified index to the end of list. Server returns number of items removed.

◆ as_operations_list_set()

AS_EXTERN bool as_operations_list_set ( as_operations * ops,
const char * name,
as_cdt_ctx * ctx,
as_list_policy * policy,
int64_t index,
as_val * val )

Create list set operation with policy. Server sets item value at specified index in list bin. Server does not return a result by default.

This function takes ownership and frees heap memory associated with val parameter.

◆ as_operations_list_set_order()

AS_EXTERN bool as_operations_list_set_order ( as_operations * ops,
const char * name,
as_cdt_ctx * ctx,
as_list_order order )

Create set list order operation. Server sets list order. Server returns null.

◆ as_operations_list_size()

AS_EXTERN bool as_operations_list_size ( as_operations * ops,
const char * name,
as_cdt_ctx * ctx )

Create list size operation. Server returns size of list.

◆ as_operations_list_sort()

AS_EXTERN bool as_operations_list_sort ( as_operations * ops,
const char * name,
as_cdt_ctx * ctx,
as_list_sort_flags flags )

Create list sort operation. Server sorts list according to flags. Server does not return a result by default.

◆ as_operations_list_trim()

AS_EXTERN bool as_operations_list_trim ( as_operations * ops,
const char * name,
as_cdt_ctx * ctx,
int64_t index,
uint64_t count )

Create list trim operation. Server removes items in list bin that do not fall into range specified by index and count range. If the range is out of bounds, then all items will be removed. Server returns list size after trim.