All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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_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]

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_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]]
+ 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

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.

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_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);

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.

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.

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

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.

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.

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 921 of file as_list_operations.h.

References as_operations_list_append().

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 964 of file as_list_operations.h.

References as_double::as_double_init(), and as_operations_list_append().

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 949 of file as_list_operations.h.

References as_integer::as_integer_init(), and as_operations_list_append().

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 1049 of file as_list_operations.h.

References as_operations_list_append_items().

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 1062 of file as_list_operations.h.

References as_operations_list_append_items().

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 1034 of file as_list_operations.h.

References 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 1015 of file as_list_operations.h.

References as_bytes::as_bytes_init_wrap(), and as_operations_list_append().

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 1000 of file as_list_operations.h.

References 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 981 of file as_list_operations.h.

References as_operations_list_append(), and as_string::as_string_init().

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 934 of file as_list_operations.h.

References as_operations_list_append().

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 1697 of file as_list_operations.h.

References as_operations_list_clear().

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 1724 of file as_list_operations.h.

References as_operations_list_get().

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 1865 of file as_list_operations.h.

References as_operations_list_get_by_index().

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 1895 of file as_list_operations.h.

References as_operations_list_get_by_index_range().

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 1880 of file as_list_operations.h.

References as_operations_list_get_by_index_range_to_end().

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 1910 of file as_list_operations.h.

References as_operations_list_get_by_rank().

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 1940 of file as_list_operations.h.

References as_operations_list_get_by_rank_range().

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 1925 of file as_list_operations.h.

References as_operations_list_get_by_rank_range_to_end().

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 1762 of file as_list_operations.h.

References as_operations_list_get_by_value().

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 1795 of file as_list_operations.h.

References as_operations_list_get_by_value_list().

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 1780 of file as_list_operations.h.

References as_operations_list_get_by_value_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 1849 of file as_list_operations.h.

References as_operations_list_get_by_value_rel_rank_range().

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 1821 of file as_list_operations.h.

References as_operations_list_get_by_value_rel_rank_range_to_end().

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 1736 of file as_list_operations.h.

References as_operations_list_get_range().

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 1750 of file as_list_operations.h.

References as_operations_list_get_range_from().

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 1245 of file as_list_operations.h.

References as_operations_list_increment().

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 1260 of file as_list_operations.h.

References as_operations_list_increment().

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 1077 of file as_list_operations.h.

References as_operations_list_insert().

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 1124 of file as_list_operations.h.

References as_double::as_double_init(), and as_operations_list_insert().

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 1107 of file as_list_operations.h.

References as_integer::as_integer_init(), and as_operations_list_insert().

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 1214 of file as_list_operations.h.

References as_operations_list_insert_items().

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 1229 of file as_list_operations.h.

References as_operations_list_insert_items().

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 1199 of file as_list_operations.h.

References 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 1179 of file as_list_operations.h.

References as_bytes::as_bytes_init_wrap(), and as_operations_list_insert().

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 1162 of file as_list_operations.h.

References 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 1143 of file as_list_operations.h.

References as_operations_list_insert(), and as_string::as_string_init().

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 1092 of file as_list_operations.h.

References as_operations_list_insert().

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 1409 of file as_list_operations.h.

References as_operations_list_pop().

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 1421 of file as_list_operations.h.

References as_operations_list_pop_range().

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 1436 of file as_list_operations.h.

References as_operations_list_pop_range_from().

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 1449 of file as_list_operations.h.

References as_operations_list_remove().

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 1592 of file as_list_operations.h.

References as_operations_list_remove_by_index().

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 1621 of file as_list_operations.h.

References as_operations_list_remove_by_index_range().

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 1607 of file as_list_operations.h.

References as_operations_list_remove_by_index_range_to_end().

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 1636 of file as_list_operations.h.

References as_operations_list_remove_by_rank().

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 1665 of file as_list_operations.h.

References as_operations_list_remove_by_rank_range().

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 1651 of file as_list_operations.h.

References as_operations_list_remove_by_rank_range_to_end().

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 1489 of file as_list_operations.h.

References as_operations_list_remove_by_value().

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 1503 of file as_list_operations.h.

References as_operations_list_remove_by_value_list().

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 1521 of file as_list_operations.h.

References as_operations_list_remove_by_value_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 1576 of file as_list_operations.h.

References as_operations_list_remove_by_value_rel_rank_range().

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 1548 of file as_list_operations.h.

References as_operations_list_remove_by_value_rel_rank_range_to_end().

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 1462 of file as_list_operations.h.

References as_operations_list_remove_range().

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 1477 of file as_list_operations.h.

References as_operations_list_remove_range_from().

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 1275 of file as_list_operations.h.

References as_operations_list_set().

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 1320 of file as_list_operations.h.

References as_double::as_double_init(), and as_operations_list_set().

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 1303 of file as_list_operations.h.

References as_integer::as_integer_init(), and as_operations_list_set().

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 894 of file as_list_operations.h.

References as_operations_list_set_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 
)
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 1395 of file as_list_operations.h.

References 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 1375 of file as_list_operations.h.

References as_bytes::as_bytes_init_wrap(), and as_operations_list_set().

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 1358 of file as_list_operations.h.

References 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 1339 of file as_list_operations.h.

References as_operations_list_set(), and as_string::as_string_init().

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 1288 of file as_list_operations.h.

References as_operations_list_set().

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 1712 of file as_list_operations.h.

References as_operations_list_size().

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 908 of file as_list_operations.h.

References as_operations_list_sort().

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 1682 of file as_list_operations.h.

References as_operations_list_trim().

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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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.