All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Data Structures | Enumerations | Functions
Map Operations

Description

Unique key map bin operations. Create map operations used by the client operate command. The default unique key map is unordered. Valid map key types are:

All maps maintain an index and a rank. The index is the item offset from the start of the map, for both unordered and ordered maps. The rank is the sorted index of the value component. Map supports negative indexing for index and rank.

Index examples:

Rank examples:

Code examples:

// bin = {key1=11, key2=22, key3=33}
// Set map value to 11 for map key "key2".
as_string_init(&key, "key2", false);
as_integer_init(&val, 11);
as_operations_map_put(&ops, "bin", NULL, NULL, (as_val*)&key, (as_val*)&val);
as_record* rec = NULL;
aerospike_key_operate(&as, &err, NULL, &key, &ops, &rec);
// bin result = {key1=11, key2=11, key3=33}

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

// bin = {key1={key11=9,key12=4}, key2={key21=3,key22=5}}
// Set map value to 11 for map key "key21" inside of map key "key2".
as_string_init(&str, "key2", false);
as_string_init(&key, "key21", false);
as_integer_init(&val, 11);
as_operations_map_put(&ops, "bin", &ctx, NULL, (as_val*)&key, (as_val*)&val);
as_record* rec = NULL;
aerospike_key_operate(&as, &err, NULL, &key, &ops, &rec);
// bin result = {key1={key11=9,key12=4},key2={key21=11,key22=5}}
+ Collaboration diagram for Map Operations:

Data Structures

struct  as_map_policy
 

Enumerations

enum  as_map_order { AS_MAP_UNORDERED = 0, AS_MAP_KEY_ORDERED = 1, AS_MAP_KEY_VALUE_ORDERED = 3 }
 
enum  as_map_return_type {
  AS_MAP_RETURN_NONE = 0, AS_MAP_RETURN_INDEX = 1, AS_MAP_RETURN_REVERSE_INDEX = 2, AS_MAP_RETURN_RANK = 3,
  AS_MAP_RETURN_REVERSE_RANK = 4, AS_MAP_RETURN_COUNT = 5, AS_MAP_RETURN_KEY = 6, AS_MAP_RETURN_VALUE = 7,
  AS_MAP_RETURN_KEY_VALUE = 8, AS_MAP_RETURN_EXISTS = 13, AS_MAP_RETURN_UNORDERED_MAP = 16, AS_MAP_RETURN_ORDERED_MAP = 17,
  AS_MAP_RETURN_INVERTED = 0x10000
}
 
enum  as_map_write_flags {
  AS_MAP_WRITE_DEFAULT = 0, AS_MAP_WRITE_CREATE_ONLY = 1, AS_MAP_WRITE_UPDATE_ONLY = 2, AS_MAP_WRITE_NO_FAIL = 4,
  AS_MAP_WRITE_PARTIAL = 8
}
 
enum  as_map_write_mode { AS_MAP_UPDATE, AS_MAP_UPDATE_ONLY, AS_MAP_CREATE_ONLY }
 

Functions

AS_EXTERN void as_map_policy_init (as_map_policy *policy)
 
AS_EXTERN void as_map_policy_set (as_map_policy *policy, as_map_order order, as_map_write_mode mode)
 
AS_EXTERN void as_map_policy_set_all (as_map_policy *policy, as_map_order order, uint32_t flags, bool persist_index)
 
AS_EXTERN void as_map_policy_set_flags (as_map_policy *policy, as_map_order order, uint32_t flags)
 
static bool as_operations_add_map_clear (as_operations *ops, const char *name)
 
static bool as_operations_add_map_decrement (as_operations *ops, const char *name, as_map_policy *policy, as_val *key, as_val *value)
 
static bool as_operations_add_map_get_by_index (as_operations *ops, const char *name, int64_t index, as_map_return_type return_type)
 
static bool as_operations_add_map_get_by_index_range (as_operations *ops, const char *name, int64_t index, uint64_t count, as_map_return_type return_type)
 
static bool as_operations_add_map_get_by_index_range_to_end (as_operations *ops, const char *name, int64_t index, as_map_return_type return_type)
 
static bool as_operations_add_map_get_by_key (as_operations *ops, const char *name, as_val *key, as_map_return_type return_type)
 
static bool as_operations_add_map_get_by_key_list (as_operations *ops, const char *name, as_list *keys, as_map_return_type return_type)
 
static bool as_operations_add_map_get_by_key_range (as_operations *ops, const char *name, as_val *begin, as_val *end, as_map_return_type return_type)
 
static bool as_operations_add_map_get_by_key_rel_index_range (as_operations *ops, const char *name, as_val *key, int64_t index, uint64_t count, as_map_return_type return_type)
 
static bool as_operations_add_map_get_by_key_rel_index_range_to_end (as_operations *ops, const char *name, as_val *key, int64_t index, as_map_return_type return_type)
 
static bool as_operations_add_map_get_by_rank (as_operations *ops, const char *name, int64_t rank, as_map_return_type return_type)
 
static bool as_operations_add_map_get_by_rank_range (as_operations *ops, const char *name, int64_t rank, uint64_t count, as_map_return_type return_type)
 
static bool as_operations_add_map_get_by_rank_range_to_end (as_operations *ops, const char *name, int64_t rank, as_map_return_type return_type)
 
static bool as_operations_add_map_get_by_value (as_operations *ops, const char *name, as_val *value, as_map_return_type return_type)
 
static bool as_operations_add_map_get_by_value_list (as_operations *ops, const char *name, as_list *values, as_map_return_type return_type)
 
static bool as_operations_add_map_get_by_value_range (as_operations *ops, const char *name, as_val *begin, as_val *end, as_map_return_type return_type)
 
static bool as_operations_add_map_get_by_value_rel_rank_range (as_operations *ops, const char *name, as_val *value, int64_t rank, uint64_t count, as_map_return_type return_type)
 
static bool as_operations_add_map_get_by_value_rel_rank_range_to_end (as_operations *ops, const char *name, as_val *value, int64_t rank, as_map_return_type return_type)
 
static bool as_operations_add_map_increment (as_operations *ops, const char *name, as_map_policy *policy, as_val *key, as_val *value)
 
static bool as_operations_add_map_put (as_operations *ops, const char *name, as_map_policy *policy, as_val *key, as_val *value)
 
static bool as_operations_add_map_put_items (as_operations *ops, const char *name, as_map_policy *policy, as_map *items)
 
static bool as_operations_add_map_remove_by_index (as_operations *ops, const char *name, int64_t index, as_map_return_type return_type)
 
static bool as_operations_add_map_remove_by_index_range (as_operations *ops, const char *name, int64_t index, uint64_t count, as_map_return_type return_type)
 
static bool as_operations_add_map_remove_by_index_range_to_end (as_operations *ops, const char *name, int64_t index, as_map_return_type return_type)
 
static bool as_operations_add_map_remove_by_key (as_operations *ops, const char *name, as_val *key, as_map_return_type return_type)
 
static bool as_operations_add_map_remove_by_key_list (as_operations *ops, const char *name, as_list *keys, as_map_return_type return_type)
 
static bool as_operations_add_map_remove_by_key_range (as_operations *ops, const char *name, as_val *begin, as_val *end, as_map_return_type return_type)
 
static bool as_operations_add_map_remove_by_key_rel_index_range (as_operations *ops, const char *name, as_val *key, int64_t index, uint64_t count, as_map_return_type return_type)
 
static bool as_operations_add_map_remove_by_key_rel_index_range_to_end (as_operations *ops, const char *name, as_val *key, int64_t index, as_map_return_type return_type)
 
static bool as_operations_add_map_remove_by_rank (as_operations *ops, const char *name, int64_t rank, as_map_return_type return_type)
 
static bool as_operations_add_map_remove_by_rank_range (as_operations *ops, const char *name, int64_t rank, uint64_t count, as_map_return_type return_type)
 
static bool as_operations_add_map_remove_by_rank_range_to_end (as_operations *ops, const char *name, int64_t rank, as_map_return_type return_type)
 
static bool as_operations_add_map_remove_by_value (as_operations *ops, const char *name, as_val *value, as_map_return_type return_type)
 
static bool as_operations_add_map_remove_by_value_list (as_operations *ops, const char *name, as_list *values, as_map_return_type return_type)
 
static bool as_operations_add_map_remove_by_value_range (as_operations *ops, const char *name, as_val *begin, as_val *end, as_map_return_type return_type)
 
static bool as_operations_add_map_remove_by_value_rel_rank_range (as_operations *ops, const char *name, as_val *value, int64_t rank, uint64_t count, as_map_return_type return_type)
 
static bool as_operations_add_map_remove_by_value_rel_rank_range_to_end (as_operations *ops, const char *name, as_val *value, int64_t rank, as_map_return_type return_type)
 
static bool as_operations_add_map_set_policy (as_operations *ops, const char *name, as_map_policy *policy)
 
static bool as_operations_add_map_size (as_operations *ops, const char *name)
 
AS_EXTERN bool as_operations_map_clear (as_operations *ops, const char *name, as_cdt_ctx *ctx)
 
AS_EXTERN bool as_operations_map_create (as_operations *ops, const char *name, as_cdt_ctx *ctx, as_map_order order)
 
AS_EXTERN bool as_operations_map_create_all (as_operations *ops, const char *name, as_cdt_ctx *ctx, as_map_order order, bool persist_index)
 
AS_EXTERN bool as_operations_map_decrement (as_operations *ops, const char *name, as_cdt_ctx *ctx, as_map_policy *policy, as_val *key, as_val *value)
 
AS_EXTERN bool as_operations_map_get_by_index (as_operations *ops, const char *name, as_cdt_ctx *ctx, int64_t index, as_map_return_type return_type)
 
AS_EXTERN bool as_operations_map_get_by_index_range (as_operations *ops, const char *name, as_cdt_ctx *ctx, int64_t index, uint64_t count, as_map_return_type return_type)
 
AS_EXTERN bool as_operations_map_get_by_index_range_to_end (as_operations *ops, const char *name, as_cdt_ctx *ctx, int64_t index, as_map_return_type return_type)
 
AS_EXTERN bool as_operations_map_get_by_key (as_operations *ops, const char *name, as_cdt_ctx *ctx, as_val *key, as_map_return_type return_type)
 
AS_EXTERN bool as_operations_map_get_by_key_list (as_operations *ops, const char *name, as_cdt_ctx *ctx, as_list *keys, as_map_return_type return_type)
 
AS_EXTERN bool as_operations_map_get_by_key_range (as_operations *ops, const char *name, as_cdt_ctx *ctx, as_val *begin, as_val *end, as_map_return_type return_type)
 
AS_EXTERN bool as_operations_map_get_by_key_rel_index_range (as_operations *ops, const char *name, as_cdt_ctx *ctx, as_val *key, int64_t index, uint64_t count, as_map_return_type return_type)
 
AS_EXTERN bool as_operations_map_get_by_key_rel_index_range_to_end (as_operations *ops, const char *name, as_cdt_ctx *ctx, as_val *key, int64_t index, as_map_return_type return_type)
 
AS_EXTERN bool as_operations_map_get_by_rank (as_operations *ops, const char *name, as_cdt_ctx *ctx, int64_t rank, as_map_return_type return_type)
 
AS_EXTERN bool as_operations_map_get_by_rank_range (as_operations *ops, const char *name, as_cdt_ctx *ctx, int64_t rank, uint64_t count, as_map_return_type return_type)
 
AS_EXTERN bool as_operations_map_get_by_rank_range_to_end (as_operations *ops, const char *name, as_cdt_ctx *ctx, int64_t rank, as_map_return_type return_type)
 
AS_EXTERN bool as_operations_map_get_by_value (as_operations *ops, const char *name, as_cdt_ctx *ctx, as_val *value, as_map_return_type return_type)
 
AS_EXTERN bool as_operations_map_get_by_value_list (as_operations *ops, const char *name, as_cdt_ctx *ctx, as_list *values, as_map_return_type return_type)
 
AS_EXTERN bool as_operations_map_get_by_value_range (as_operations *ops, const char *name, as_cdt_ctx *ctx, as_val *begin, as_val *end, as_map_return_type return_type)
 
AS_EXTERN bool as_operations_map_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_map_return_type return_type)
 
AS_EXTERN bool as_operations_map_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_map_return_type return_type)
 
AS_EXTERN bool as_operations_map_increment (as_operations *ops, const char *name, as_cdt_ctx *ctx, as_map_policy *policy, as_val *key, as_val *value)
 
AS_EXTERN bool as_operations_map_put (as_operations *ops, const char *name, as_cdt_ctx *ctx, as_map_policy *policy, as_val *key, as_val *value)
 
AS_EXTERN bool as_operations_map_put_items (as_operations *ops, const char *name, as_cdt_ctx *ctx, as_map_policy *policy, as_map *items)
 
AS_EXTERN bool as_operations_map_remove_by_index (as_operations *ops, const char *name, as_cdt_ctx *ctx, int64_t index, as_map_return_type return_type)
 
AS_EXTERN bool as_operations_map_remove_by_index_range (as_operations *ops, const char *name, as_cdt_ctx *ctx, int64_t index, uint64_t count, as_map_return_type return_type)
 
AS_EXTERN bool as_operations_map_remove_by_index_range_to_end (as_operations *ops, const char *name, as_cdt_ctx *ctx, int64_t index, as_map_return_type return_type)
 
AS_EXTERN bool as_operations_map_remove_by_key (as_operations *ops, const char *name, as_cdt_ctx *ctx, as_val *key, as_map_return_type return_type)
 
AS_EXTERN bool as_operations_map_remove_by_key_list (as_operations *ops, const char *name, as_cdt_ctx *ctx, as_list *keys, as_map_return_type return_type)
 
AS_EXTERN bool as_operations_map_remove_by_key_range (as_operations *ops, const char *name, as_cdt_ctx *ctx, as_val *begin, as_val *end, as_map_return_type return_type)
 
AS_EXTERN bool as_operations_map_remove_by_key_rel_index_range (as_operations *ops, const char *name, as_cdt_ctx *ctx, as_val *key, int64_t index, uint64_t count, as_map_return_type return_type)
 
AS_EXTERN bool as_operations_map_remove_by_key_rel_index_range_to_end (as_operations *ops, const char *name, as_cdt_ctx *ctx, as_val *key, int64_t index, as_map_return_type return_type)
 
AS_EXTERN bool as_operations_map_remove_by_rank (as_operations *ops, const char *name, as_cdt_ctx *ctx, int64_t rank, as_map_return_type return_type)
 
AS_EXTERN bool as_operations_map_remove_by_rank_range (as_operations *ops, const char *name, as_cdt_ctx *ctx, int64_t rank, uint64_t count, as_map_return_type return_type)
 
AS_EXTERN bool as_operations_map_remove_by_rank_range_to_end (as_operations *ops, const char *name, as_cdt_ctx *ctx, int64_t rank, as_map_return_type return_type)
 
AS_EXTERN bool as_operations_map_remove_by_value (as_operations *ops, const char *name, as_cdt_ctx *ctx, as_val *value, as_map_return_type return_type)
 
AS_EXTERN bool as_operations_map_remove_by_value_list (as_operations *ops, const char *name, as_cdt_ctx *ctx, as_list *values, as_map_return_type return_type)
 
AS_EXTERN bool as_operations_map_remove_by_value_range (as_operations *ops, const char *name, as_cdt_ctx *ctx, as_val *begin, as_val *end, as_map_return_type return_type)
 
AS_EXTERN bool as_operations_map_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_map_return_type return_type)
 
AS_EXTERN bool as_operations_map_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_map_return_type return_type)
 
AS_EXTERN bool as_operations_map_set_policy (as_operations *ops, const char *name, as_cdt_ctx *ctx, as_map_policy *policy)
 
AS_EXTERN bool as_operations_map_size (as_operations *ops, const char *name, as_cdt_ctx *ctx)
 

Enumeration Type Documentation

Map storage order.

Enumerator
AS_MAP_UNORDERED 

Map is not ordered. This is the default.

AS_MAP_KEY_ORDERED 

Order map by key.

AS_MAP_KEY_VALUE_ORDERED 

Order map by key, then value.

Definition at line 51 of file as_cdt_order.h.

Map return type. Type of data to return when selecting or removing items from the map.

Enumerator
AS_MAP_RETURN_NONE 

Do not return a result.

AS_MAP_RETURN_INDEX 

Return key index order.

AS_MAP_RETURN_REVERSE_INDEX 

Return reverse key order.

AS_MAP_RETURN_RANK 

Return value order.

AS_MAP_RETURN_REVERSE_RANK 

Return reverse value order.

AS_MAP_RETURN_COUNT 

Return count of items selected.

AS_MAP_RETURN_KEY 

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

AS_MAP_RETURN_VALUE 

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

AS_MAP_RETURN_KEY_VALUE 

Return key/value items.

AS_MAP_RETURN_EXISTS 

Return true if count > 0.

AS_MAP_RETURN_UNORDERED_MAP 

Return an unordered map.

AS_MAP_RETURN_ORDERED_MAP 

Return an ordered map.

AS_MAP_RETURN_INVERTED 

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

as_operations_add_map_remove_by_key_range(&ops, BIN_NAME, (as_val*)&mkey1, (as_val*)&mkey2,
as_record* rec = NULL;
as_status status = aerospike_key_operate(as, &err, NULL, &key, &ops, &rec);

With AS_MAP_RETURN_INVERTED enabled, the keys outside of the specified key range will be removed and returned.

Definition at line 199 of file as_map_operations.h.

Map write bit flags. Requires server versions >= 4.3.

Enumerator
AS_MAP_WRITE_DEFAULT 

Default. Allow create or update.

AS_MAP_WRITE_CREATE_ONLY 

If the key already exists, the item will be denied. If the key does not exist, a new item will be created.

AS_MAP_WRITE_UPDATE_ONLY 

If the key already exists, the item will be overwritten. If the key does not exist, the item will be denied.

AS_MAP_WRITE_NO_FAIL 

Do not raise error if a map item is denied due to write flag constraints.

AS_MAP_WRITE_PARTIAL 

Allow other valid map items to be committed if a map item is denied due to write flag constraints.

Definition at line 152 of file as_map_operations.h.

Map write mode. This enum should only be used for server versions < 4.3. as_map_write_flags is recommended for server versions >= 4.3.

Enumerator
AS_MAP_UPDATE 

If the key already exists, the item will be overwritten. If the key does not exist, a new item will be created.

AS_MAP_UPDATE_ONLY 

If the key already exists, the item will be overwritten. If the key does not exist, the write will fail.

AS_MAP_CREATE_ONLY 

If the key already exists, the write will fail. If the key does not exist, a new item will be created.

Definition at line 126 of file as_map_operations.h.

Function Documentation

AS_EXTERN void as_map_policy_init ( as_map_policy policy)

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

AS_EXTERN void as_map_policy_set ( as_map_policy policy,
as_map_order  order,
as_map_write_mode  mode 
)

Set map attributes to specified map order and write mode semantics.

This function should only be used for server versions < 4.3. as_map_policy_set_flags is recommended for server versions >= 4.3.

AS_EXTERN void as_map_policy_set_all ( as_map_policy policy,
as_map_order  order,
uint32_t  flags,
bool  persist_index 
)

Set map attributes to specified map order, write flags and whether to persist the map index.

Parameters
policyTarget map policy.
orderMap order.
flagsMap write flags. See as_map_write_flags.
persist_indexIf true, persist map index. A map index improves lookup performance, but requires more storage. A map index can be created for a top-level ordered map only. Nested and unordered map indexes are not supported.
AS_EXTERN void as_map_policy_set_flags ( as_map_policy policy,
as_map_order  order,
uint32_t  flags 
)

Set map attributes to specified map order and write flags (See as_map_write_flags).

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

Create map clear operation. Server removes all items in map. Server returns null.

Definition at line 1101 of file as_map_operations.h.

References as_operations_map_clear().

static bool as_operations_add_map_decrement ( as_operations ops,
const char *  name,
as_map_policy policy,
as_val key,
as_val value 
)
inlinestatic

Create map decrement operation. Server decrement values by decr for all items identified by key and returns final result. Valid only for numbers.

The required map policy dictates the type of map to create when it does not exist. The map policy also specifies the mode used when writing items to the map. See as_map_policy and as_map_write_mode.

Definition at line 1087 of file as_map_operations.h.

References as_operations_map_decrement().

static bool as_operations_add_map_get_by_index ( as_operations ops,
const char *  name,
int64_t  index,
as_map_return_type  return_type 
)
inlinestatic

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

Definition at line 1606 of file as_map_operations.h.

References as_operations_map_get_by_index().

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

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

Definition at line 1636 of file as_map_operations.h.

References as_operations_map_get_by_index_range().

static bool as_operations_add_map_get_by_index_range_to_end ( as_operations ops,
const char *  name,
int64_t  index,
as_map_return_type  return_type 
)
inlinestatic

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

Definition at line 1621 of file as_map_operations.h.

References as_operations_map_get_by_index_range_to_end().

static bool as_operations_add_map_get_by_key ( as_operations ops,
const char *  name,
as_val key,
as_map_return_type  return_type 
)
inlinestatic

Create map get by key operation. Server selects map item identified by key and returns selected data specified by return_type.

Definition at line 1410 of file as_map_operations.h.

References as_operations_map_get_by_key().

static bool as_operations_add_map_get_by_key_list ( as_operations ops,
const char *  name,
as_list keys,
as_map_return_type  return_type 
)
inlinestatic

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

Definition at line 1443 of file as_map_operations.h.

References as_operations_map_get_by_key_list().

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

Create map get by key range operation. Server selects map items identified by key 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 1428 of file as_map_operations.h.

References as_operations_map_get_by_key_range().

static bool as_operations_add_map_get_by_key_rel_index_range ( as_operations ops,
const char *  name,
as_val key,
int64_t  index,
uint64_t  count,
as_map_return_type  return_type 
)
inlinestatic

Create map get by key relative to index range operation. Server selects map items nearest to key and greater by index with a count limit. Server returns selected data specified by return_type.

Examples for ordered map [{0=17},{4=2},{5=15},{9=10}]:

  • (value,index,count) = [selected items]
  • (5,0,1) = [{5=15}]
  • (5,1,2) = [{9=10}]
  • (5,-1,1) = [{4=2}]
  • (3,2,1) = [{9=10}]
  • (3,-2,2) = [{0=17}]

Definition at line 1495 of file as_map_operations.h.

References as_operations_map_get_by_key_rel_index_range().

static bool as_operations_add_map_get_by_key_rel_index_range_to_end ( as_operations ops,
const char *  name,
as_val key,
int64_t  index,
as_map_return_type  return_type 
)
inlinestatic

Create map get by key relative to index range operation. Server selects map items nearest to key and greater by index. Server returns selected data specified by return_type.

Examples for ordered map [{0=17},{4=2},{5=15},{9=10}]:

  • (value,index) = [selected items]
  • (5,0) = [{5=15},{9=10}]
  • (5,1) = [{9=10}]
  • (5,-1) = [{4=2},{5=15},{9=10}]
  • (3,2) = [{9=10}]
  • (3,-2) = [{0=17},{4=2},{5=15},{9=10}]

Definition at line 1468 of file as_map_operations.h.

References as_operations_map_get_by_key_rel_index_range_to_end().

static bool as_operations_add_map_get_by_rank ( as_operations ops,
const char *  name,
int64_t  rank,
as_map_return_type  return_type 
)
inlinestatic

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

Definition at line 1651 of file as_map_operations.h.

References as_operations_map_get_by_rank().

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

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

Definition at line 1681 of file as_map_operations.h.

References as_operations_map_get_by_rank_range().

static bool as_operations_add_map_get_by_rank_range_to_end ( as_operations ops,
const char *  name,
int64_t  rank,
as_map_return_type  return_type 
)
inlinestatic

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

Definition at line 1666 of file as_map_operations.h.

References as_operations_map_get_by_rank_range_to_end().

static bool as_operations_add_map_get_by_value ( as_operations ops,
const char *  name,
as_val value,
as_map_return_type  return_type 
)
inlinestatic

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

Definition at line 1511 of file as_map_operations.h.

References as_operations_map_get_by_value().

static bool as_operations_add_map_get_by_value_list ( as_operations ops,
const char *  name,
as_list values,
as_map_return_type  return_type 
)
inlinestatic

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

Definition at line 1544 of file as_map_operations.h.

References as_operations_map_get_by_value_list().

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

Create map get by value range operation. Server selects map 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 1529 of file as_map_operations.h.

References as_operations_map_get_by_value_range().

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

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

Examples for map [{4=2},{9=10},{5=15},{0=17}]:

  • (value,rank,count) = [selected items]
  • (11,1,1) = [{0=17}]
  • (11,-1,1) = [{9=10}]

Definition at line 1590 of file as_map_operations.h.

References as_operations_map_get_by_value_rel_rank_range().

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

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

Examples for map [{4=2},{9=10},{5=15},{0=17}]:

  • (value,rank) = [selected items]
  • (11,1) = [{0=17}]
  • (11,-1) = [{9=10},{5=15},{0=17}]

Definition at line 1566 of file as_map_operations.h.

References as_operations_map_get_by_value_rel_rank_range_to_end().

static bool as_operations_add_map_increment ( as_operations ops,
const char *  name,
as_map_policy policy,
as_val key,
as_val value 
)
inlinestatic

Create map increment operation. Server increments values by incr for all items identified by key and returns final result. Valid only for numbers.

The required map policy dictates the type of map to create when it does not exist. The map policy also specifies the mode used when writing items to the map. See as_map_policy and as_map_write_mode.

Definition at line 1068 of file as_map_operations.h.

References as_operations_map_increment().

static bool as_operations_add_map_put ( as_operations ops,
const char *  name,
as_map_policy policy,
as_val key,
as_val value 
)
inlinestatic

Create map put operation. Server writes key/value item to map bin and returns map size.

The required map policy dictates the type of map to create when it does not exist. The map policy also specifies the mode used when writing items to the map. See as_map_policy and as_map_write_mode.

Definition at line 1031 of file as_map_operations.h.

References as_operations_map_put().

static bool as_operations_add_map_put_items ( as_operations ops,
const char *  name,
as_map_policy policy,
as_map items 
)
inlinestatic

Create map put items operation. Server writes each map item to map bin and returns map size.

The required map policy dictates the type of map to create when it does not exist. The map policy also specifies the mode used when writing items to the map. See as_map_policy and as_map_write_mode.

Definition at line 1049 of file as_map_operations.h.

References as_operations_map_put_items().

static bool as_operations_add_map_remove_by_index ( as_operations ops,
const char *  name,
int64_t  index,
as_map_return_type  return_type 
)
inlinestatic

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

Definition at line 1308 of file as_map_operations.h.

References as_operations_map_remove_by_index().

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

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

Definition at line 1338 of file as_map_operations.h.

References as_operations_map_remove_by_index_range().

static bool as_operations_add_map_remove_by_index_range_to_end ( as_operations ops,
const char *  name,
int64_t  index,
as_map_return_type  return_type 
)
inlinestatic

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

Definition at line 1323 of file as_map_operations.h.

References as_operations_map_remove_by_index_range_to_end().

static bool as_operations_add_map_remove_by_key ( as_operations ops,
const char *  name,
as_val key,
as_map_return_type  return_type 
)
inlinestatic

Create map remove operation. Server removes map item identified by key and returns removed data specified by return_type.

Definition at line 1113 of file as_map_operations.h.

References as_operations_map_remove_by_key().

static bool as_operations_add_map_remove_by_key_list ( as_operations ops,
const char *  name,
as_list keys,
as_map_return_type  return_type 
)
inlinestatic

Create map remove operation. Server removes map items identified by keys and returns removed data specified by return_type.

Definition at line 1127 of file as_map_operations.h.

References as_operations_map_remove_by_key_list().

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

Create map remove operation. Server removes map items identified by key 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 1145 of file as_map_operations.h.

References as_operations_map_remove_by_key_range().

static bool as_operations_add_map_remove_by_key_rel_index_range ( as_operations ops,
const char *  name,
as_val key,
int64_t  index,
uint64_t  count,
as_map_return_type  return_type 
)
inlinestatic

Create map remove by key relative to index range operation. Server removes map items nearest to key and greater by index with a count limit. Server returns removed data specified by return_type.

Examples for map [{0=17},{4=2},{5=15},{9=10}]:

  • (value,index,count) = [removed items]
  • (5,0,1) = [{5=15}]
  • (5,1,2) = [{9=10}]
  • (5,-1,1) = [{4=2}]
  • (3,2,1) = [{9=10}]
  • (3,-2,2) = [{0=17}]

Definition at line 1197 of file as_map_operations.h.

References as_operations_map_remove_by_key_rel_index_range().

static bool as_operations_add_map_remove_by_key_rel_index_range_to_end ( as_operations ops,
const char *  name,
as_val key,
int64_t  index,
as_map_return_type  return_type 
)
inlinestatic

Create map remove by key relative to index range operation. Server removes map items nearest to key and greater by index. Server returns removed data specified by return_type.

Examples for map [{0=17},{4=2},{5=15},{9=10}]:

  • (value,index) = [removed items]
  • (5,0) = [{5=15},{9=10}]
  • (5,1) = [{9=10}]
  • (5,-1) = [{4=2},{5=15},{9=10}]
  • (3,2) = [{9=10}]
  • (3,-2) = [{0=17},{4=2},{5=15},{9=10}]

Definition at line 1171 of file as_map_operations.h.

References as_operations_map_remove_by_key_rel_index_range_to_end().

static bool as_operations_add_map_remove_by_rank ( as_operations ops,
const char *  name,
int64_t  rank,
as_map_return_type  return_type 
)
inlinestatic

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

Definition at line 1353 of file as_map_operations.h.

References as_operations_map_remove_by_rank().

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

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

Definition at line 1383 of file as_map_operations.h.

References as_operations_map_remove_by_rank_range().

static bool as_operations_add_map_remove_by_rank_range_to_end ( as_operations ops,
const char *  name,
int64_t  rank,
as_map_return_type  return_type 
)
inlinestatic

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

Definition at line 1368 of file as_map_operations.h.

References as_operations_map_remove_by_rank_range_to_end().

static bool as_operations_add_map_remove_by_value ( as_operations ops,
const char *  name,
as_val value,
as_map_return_type  return_type 
)
inlinestatic

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

Definition at line 1213 of file as_map_operations.h.

References as_operations_map_remove_by_value().

static bool as_operations_add_map_remove_by_value_list ( as_operations ops,
const char *  name,
as_list values,
as_map_return_type  return_type 
)
inlinestatic

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

Definition at line 1227 of file as_map_operations.h.

References as_operations_map_remove_by_value_list().

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

Create map remove operation. Server removes map 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 1245 of file as_map_operations.h.

References as_operations_map_remove_by_value_range().

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

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

Examples for map [{4=2},{9=10},{5=15},{0=17}]:

  • (value,rank,count) = [removed items]
  • (11,1,1) = [{0=17}]
  • (11,-1,1) = [{9=10}]

Definition at line 1292 of file as_map_operations.h.

References as_operations_map_remove_by_value_rel_rank_range().

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

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

Examples for map [{4=2},{9=10},{5=15},{0=17}]:

  • (value,rank) = [removed items]
  • (11,1) = [{0=17}]
  • (11,-1) = [{9=10},{5=15},{0=17}]

Definition at line 1268 of file as_map_operations.h.

References as_operations_map_remove_by_value_rel_rank_range_to_end().

static bool as_operations_add_map_set_policy ( as_operations ops,
const char *  name,
as_map_policy policy 
)
inlinestatic

Create set map policy operation. Server sets map policy attributes. Server does not return a value.

Definition at line 1015 of file as_map_operations.h.

References as_operations_map_set_policy().

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

Create map size operation. Server returns size of map.

Definition at line 1398 of file as_map_operations.h.

References as_operations_map_size().

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

Create map clear operation. Server removes all items in map. Server returns null.

AS_EXTERN bool as_operations_map_create ( as_operations ops,
const char *  name,
as_cdt_ctx ctx,
as_map_order  order 
)

Create map create operation. Server creates map at given context level.

AS_EXTERN bool as_operations_map_create_all ( as_operations ops,
const char *  name,
as_cdt_ctx ctx,
as_map_order  order,
bool  persist_index 
)

Create map create operation. Server creates map at given context level.

Parameters
opsTarget operations list.
nameBin name.
ctxOptional path to nested map. If not defined, the top-level map is used.
orderMap order.
persist_indexIf true, persist map index. A map index improves lookup performance, but requires more storage. A map index can be created for a top-level ordered map only. Nested and unordered map indexes are not supported.
AS_EXTERN bool as_operations_map_decrement ( as_operations ops,
const char *  name,
as_cdt_ctx ctx,
as_map_policy policy,
as_val key,
as_val value 
)

Create map decrement operation. Server decrement values by decr for all items identified by key and returns final result. Valid only for numbers.

The required map policy dictates the type of map to create when it does not exist. The map policy also specifies the mode used when writing items to the map. See as_map_policy and as_map_write_mode.

This function takes ownership and frees heap memory associated with key/value parameters.

Deprecated:
Use as_operations_map_increment() with negative value instead.
AS_EXTERN bool as_operations_map_get_by_index ( as_operations ops,
const char *  name,
as_cdt_ctx ctx,
int64_t  index,
as_map_return_type  return_type 
)

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

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

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

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

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

AS_EXTERN bool as_operations_map_get_by_key ( as_operations ops,
const char *  name,
as_cdt_ctx ctx,
as_val key,
as_map_return_type  return_type 
)

Create map get by key operation. Server selects map item identified by key and returns selected data specified by return_type.

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

AS_EXTERN bool as_operations_map_get_by_key_list ( as_operations ops,
const char *  name,
as_cdt_ctx ctx,
as_list keys,
as_map_return_type  return_type 
)

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

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

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

Create map get by key range operation. Server selects map items identified by key 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_map_get_by_key_rel_index_range ( as_operations ops,
const char *  name,
as_cdt_ctx ctx,
as_val key,
int64_t  index,
uint64_t  count,
as_map_return_type  return_type 
)

Create map get by key relative to index range operation. Server selects map items nearest to key and greater by index with a count limit. Server returns selected data specified by return_type.

Examples for ordered map [{0=17},{4=2},{5=15},{9=10}]:

  • (value,index,count) = [selected items]
  • (5,0,1) = [{5=15}]
  • (5,1,2) = [{9=10}]
  • (5,-1,1) = [{4=2}]
  • (3,2,1) = [{9=10}]
  • (3,-2,2) = [{0=17}]

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

AS_EXTERN bool as_operations_map_get_by_key_rel_index_range_to_end ( as_operations ops,
const char *  name,
as_cdt_ctx ctx,
as_val key,
int64_t  index,
as_map_return_type  return_type 
)

Create map get by key relative to index range operation. Server selects map items nearest to key and greater by index. Server returns selected data specified by return_type.

Examples for ordered map [{0=17},{4=2},{5=15},{9=10}]:

  • (value,index) = [selected items]
  • (5,0) = [{5=15},{9=10}]
  • (5,1) = [{9=10}]
  • (5,-1) = [{4=2},{5=15},{9=10}]
  • (3,2) = [{9=10}]
  • (3,-2) = [{0=17},{4=2},{5=15},{9=10}]

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

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

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

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

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

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

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

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

Create map get by value operation. Server selects map 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_map_get_by_value_list ( as_operations ops,
const char *  name,
as_cdt_ctx ctx,
as_list values,
as_map_return_type  return_type 
)

Create map get by value list operation. Server selects map 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_map_get_by_value_range ( as_operations ops,
const char *  name,
as_cdt_ctx ctx,
as_val begin,
as_val end,
as_map_return_type  return_type 
)

Create map get by value range operation. Server selects map 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_map_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_map_return_type  return_type 
)

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

Examples for map [{4=2},{9=10},{5=15},{0=17}]:

  • (value,rank,count) = [selected items]
  • (11,1,1) = [{0=17}]
  • (11,-1,1) = [{9=10}]

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

AS_EXTERN bool as_operations_map_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_map_return_type  return_type 
)

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

Examples for map [{4=2},{9=10},{5=15},{0=17}]:

  • (value,rank) = [selected items]
  • (11,1) = [{0=17}]
  • (11,-1) = [{9=10},{5=15},{0=17}]

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

AS_EXTERN bool as_operations_map_increment ( as_operations ops,
const char *  name,
as_cdt_ctx ctx,
as_map_policy policy,
as_val key,
as_val value 
)

Create map increment operation. Server increments values by incr for all items identified by key and returns final result. Valid only for numbers.

The required map policy dictates the type of map to create when it does not exist. The map policy also specifies the mode used when writing items to the map. See as_map_policy and as_map_write_mode.

This function takes ownership and frees heap memory associated with key/value parameters.

AS_EXTERN bool as_operations_map_put ( as_operations ops,
const char *  name,
as_cdt_ctx ctx,
as_map_policy policy,
as_val key,
as_val value 
)

Create map put operation. Server writes key/value item to map bin and returns map size.

The required map policy dictates the type of map to create when it does not exist. The map policy also specifies the mode used when writing items to the map. See as_map_policy and as_map_write_mode.

This function takes ownership and frees heap memory associated with key/value parameters.

AS_EXTERN bool as_operations_map_put_items ( as_operations ops,
const char *  name,
as_cdt_ctx ctx,
as_map_policy policy,
as_map items 
)

Create map put items operation. Server writes each map item to map bin and returns map size.

The required map policy dictates the type of map to create when it does not exist. The map policy also specifies the mode used when writing items to the map. See as_map_policy and as_map_write_mode.

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

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

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

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

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

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

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

AS_EXTERN bool as_operations_map_remove_by_key ( as_operations ops,
const char *  name,
as_cdt_ctx ctx,
as_val key,
as_map_return_type  return_type 
)

Create map remove operation. Server removes map item identified by key and returns removed data specified by return_type.

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

AS_EXTERN bool as_operations_map_remove_by_key_list ( as_operations ops,
const char *  name,
as_cdt_ctx ctx,
as_list keys,
as_map_return_type  return_type 
)

Create map remove operation. Server removes map items identified by keys and returns removed data specified by return_type.

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

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

Create map remove operation. Server removes map items identified by key 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_map_remove_by_key_rel_index_range ( as_operations ops,
const char *  name,
as_cdt_ctx ctx,
as_val key,
int64_t  index,
uint64_t  count,
as_map_return_type  return_type 
)

Create map remove by key relative to index range operation. Server removes map items nearest to key and greater by index with a count limit. Server returns removed data specified by return_type.

Examples for map [{0=17},{4=2},{5=15},{9=10}]:

  • (value,index,count) = [removed items]
  • (5,0,1) = [{5=15}]
  • (5,1,2) = [{9=10}]
  • (5,-1,1) = [{4=2}]
  • (3,2,1) = [{9=10}]
  • (3,-2,2) = [{0=17}]

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

AS_EXTERN bool as_operations_map_remove_by_key_rel_index_range_to_end ( as_operations ops,
const char *  name,
as_cdt_ctx ctx,
as_val key,
int64_t  index,
as_map_return_type  return_type 
)

Create map remove by key relative to index range operation. Server removes map items nearest to key and greater by index. Server returns removed data specified by return_type.

Examples for map [{0=17},{4=2},{5=15},{9=10}]:

  • (value,index) = [removed items]
  • (5,0) = [{5=15},{9=10}]
  • (5,1) = [{9=10}]
  • (5,-1) = [{4=2},{5=15},{9=10}]
  • (3,2) = [{9=10}]
  • (3,-2) = [{0=17},{4=2},{5=15},{9=10}]

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

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

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

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

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

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

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

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

Create map remove operation. Server removes map 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_map_remove_by_value_list ( as_operations ops,
const char *  name,
as_cdt_ctx ctx,
as_list values,
as_map_return_type  return_type 
)

Create map remove operation. Server removes map 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_map_remove_by_value_range ( as_operations ops,
const char *  name,
as_cdt_ctx ctx,
as_val begin,
as_val end,
as_map_return_type  return_type 
)

Create map remove operation. Server removes map 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_map_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_map_return_type  return_type 
)

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

Examples for map [{4=2},{9=10},{5=15},{0=17}]:

  • (value,rank,count) = [removed items]
  • (11,1,1) = [{0=17}]
  • (11,-1,1) = [{9=10}]

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

AS_EXTERN bool as_operations_map_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_map_return_type  return_type 
)

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

Examples for map [{4=2},{9=10},{5=15},{0=17}]:

  • (value,rank) = [removed items]
  • (11,1) = [{0=17}]
  • (11,-1) = [{9=10},{5=15},{0=17}]

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

AS_EXTERN bool as_operations_map_set_policy ( as_operations ops,
const char *  name,
as_cdt_ctx ctx,
as_map_policy policy 
)

Create set map policy operation. Server sets map policy attributes. Server does not return a value.

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

Create map size operation. Server returns size of map.