Map bin operations
Aerospike map bin expressions read and modify map-type bins inside filter, operation, and projection pipelines. Use them with comparison and logic expressions when you need a boolean filter, or compose them with record storage typed-bin readers (bin_map) when you need the map value first.
In each operation, the map operand (map_bin_expr in the argument tables) is any map-valued expression: not only a named map bin, but also the result of another expression that evaluates to a map. Map operations compose by passing those values as the map input—for example, taking the size of a map after a put. For nested collection data and path filters, see Querying collection data types and Path expressions.
This reference covers read operations (size, get-by-key, get-by-value, index and rank variants, ranges, and the map_keys/map_values extraction helpers) and modify operations (put, put_items, increment, clear, and remove_by_* variants). Map modify expressions evaluate on a temporary map value; they do not persist unless used in a write operation that stores the result. Map operations change the copy of the map bin in place.
Composing expressions
The map_put reference includes an example that wraps MapExp.put in MapExp.size—the same modify-then-read pattern described above. Many other modify operations show similar composition: their examples nest another map expression as the map operand (map_bin_expr in the arguments table).
Extraction helpers
The map_keys and map_values expressions (server 8.1.2+) are on the Exp class, not MapExp. They take a single map-valued expression and return a list—no context or return_type parameter. Use them to convert a map to a list of its keys or values for further expression processing, for example with in_list.
Modify
map_clear(context, bin)Clear all elements in map bin.
| Name | Type |
|---|---|
context | library_specific |
bin | map_bin_expr |
map_bin Hypothetical filter using an empty map after map_clear.
import com.aerospike.client.exp.Expression;import com.aerospike.client.exp.Exp;import com.aerospike.client.exp.MapExp;
Expression exp = Exp.build(Exp.eq(MapExp.size(MapExp.clear(Exp.mapBin("stock"))), Exp.val(0)));from aerospike_helpers.expressions import Eq, MapBinfrom aerospike_helpers.expressions.map import MapClear, MapSize
exp = Eq(MapSize(None, MapClear(None, MapBin("stock"))), 0).compile()as_exp_build(predexp, as_exp_cmp_eq( as_exp_map_size(NULL, as_exp_map_clear(NULL, as_exp_bin_map("stock"))), as_exp_int(0)));// Requires: import as "github.com/aerospike/aerospike-client-go/v6"_ = as.ExpEq(as.ExpMapSize(as.ExpMapClear(as.ExpMapBin("stock"))), as.ExpIntVal(0))Expression exp = Exp.Build( Exp.EQ(MapExp.Size(MapExp.Clear(Exp.MapBin("stock"))), Exp.Val(0)));const Aerospike = require('aerospike')const exp = Aerospike.exp
const filterExp = exp.eq(exp.maps.size(exp.maps.clear(exp.binMap('stock'))), exp.int(0))map_increment(context, policy, key, delta, bin)Increment element at key by delta.
| Name | Type |
|---|---|
context | library_specific |
policy | library_specific |
key | expr |
delta | integer_expr |
bin | map_bin_expr |
map_bin Hypothetical filter using the value at sku-a after incrementing it by 5.
import com.aerospike.client.cdt.MapPolicy;import com.aerospike.client.cdt.MapReturnType;import com.aerospike.client.exp.Expression;import com.aerospike.client.exp.Exp;import com.aerospike.client.exp.MapExp;
Expression exp = Exp.build( Exp.eq( MapExp.getByKey( MapReturnType.VALUE, Exp.Type.INT, Exp.val("sku-a"), MapExp.increment(MapPolicy.Default, Exp.val("sku-a"), Exp.val(5), Exp.mapBin("stock"))), Exp.val(100)));import aerospikefrom aerospike_helpers.expressions import Eq, MapBin, ResultTypefrom aerospike_helpers.expressions.map import MapGetByKey, MapIncrement
exp = Eq( MapGetByKey( None, aerospike.MAP_RETURN_VALUE, ResultType.INTEGER, "sku-a", MapIncrement(None, None, "sku-a", 5, MapBin("stock")), ), 100,).compile()as_map_policy mp;as_map_policy_init(&mp);as_exp_build(predexp, as_exp_cmp_eq( as_exp_map_get_by_key( NULL, AS_MAP_RETURN_VALUE, AS_EXP_TYPE_INT, as_exp_str("sku-a"), as_exp_map_increment(NULL, &mp, as_exp_str("sku-a"), as_exp_int(5), as_exp_bin_map("stock"))), as_exp_int(100)));// Requires: import as "github.com/aerospike/aerospike-client-go/v6"_ = as.ExpEq( as.ExpMapGetByKey( as.MapReturnType.VALUE, as.ExpTypeINT, as.ExpStringVal("sku-a"), as.ExpMapIncrement( as.DefaultMapPolicy(), as.ExpStringVal("sku-a"), as.ExpIntVal(5), as.ExpMapBin("stock"), ), ), as.ExpIntVal(100),)Expression exp = Exp.Build( Exp.EQ( MapExp.GetByKey( MapReturnType.VALUE, Exp.Type.INT, Exp.Val("sku-a"), MapExp.Increment(MapPolicy.Default, Exp.Val("sku-a"), Exp.Val(5), Exp.MapBin("stock"))), Exp.Val(100)));const Aerospike = require('aerospike')const exp = Aerospike.expconst maps = Aerospike.maps
const filterExp = exp.eq( exp.maps.getByKey( exp.maps.increment(exp.binMap('stock'), exp.int(5), exp.str('sku-a'), null), exp.str('sku-a'), exp.type.INT, maps.returnType.VALUE, ), exp.int(100),)map_put(context, policy, key, value, bin)Add {key, value} element to bin. map_put does not create a new bin if the specified bin does not exist, unlike the put CDT Map operation, which does create a new bin if the specified bin does not exist.
| Name | Type |
|---|---|
context | library_specific |
policy | library_specific |
key | expr |
value | expr |
bin | map_bin_expr |
map_bin Hypothetical filter using the map after putting {sku-a: 12} into stock.
import com.aerospike.client.cdt.MapPolicy;import com.aerospike.client.exp.Expression;import com.aerospike.client.exp.Exp;import com.aerospike.client.exp.MapExp;
Expression exp = Exp.build( Exp.gt( MapExp.size(MapExp.put(MapPolicy.Default, Exp.val("sku-a"), Exp.val(12), Exp.mapBin("stock"))), Exp.val(2)));from aerospike_helpers.expressions import GT, MapBinfrom aerospike_helpers.expressions.map import MapPut, MapSize
exp = GT(MapSize(None, MapPut(None, None, "sku-a", 12, MapBin("stock"))), 2).compile()as_map_policy mp;as_map_policy_init(&mp);as_exp_build(predexp, as_exp_cmp_gt( as_exp_map_size( NULL, as_exp_map_put(NULL, &mp, as_exp_str("sku-a"), as_exp_int(12), as_exp_bin_map("stock"))), as_exp_int(2)));// Requires: import as "github.com/aerospike/aerospike-client-go/v6"_ = as.ExpGreater( as.ExpMapSize( as.ExpMapPut( as.DefaultMapPolicy(), as.ExpStringVal("sku-a"), as.ExpIntVal(12), as.ExpMapBin("stock"), ), ), as.ExpIntVal(2),)Expression exp = Exp.Build( Exp.GT( MapExp.Size(MapExp.Put(MapPolicy.Default, Exp.Val("sku-a"), Exp.Val(12), Exp.MapBin("stock"))), Exp.Val(2)));const Aerospike = require('aerospike')const exp = Aerospike.exp
const filterExp = exp.gt( exp.maps.size(exp.maps.put(exp.binMap('stock'), exp.int(12), exp.str('sku-a'), null)), exp.int(2),)map_put_items(context, policy, items, bin)Add elements in items to bin. map_put_items does not create a new bin if the specified bin does not exist, unlike the put_items CDT Map operation, which does create a new bin if the specified bin does not exist.
| Name | Type |
|---|---|
context | library_specific |
policy | library_specific |
items | map_expr |
bin | map_bin_expr |
map_bin Hypothetical filter using the map after merging additional SKU entries into stock.
import com.aerospike.client.cdt.MapPolicy;import com.aerospike.client.exp.Expression;import com.aerospike.client.exp.Exp;import com.aerospike.client.exp.MapExp;
Expression exp = Exp.build( Exp.gt( MapExp.size( MapExp.putItems( MapPolicy.Default, Exp.val(java.util.Map.of("sku-b", 2, "sku-c", 3)), Exp.mapBin("stock"))), Exp.val(3)));from aerospike_helpers.expressions import GT, MapBinfrom aerospike_helpers.expressions.map import MapPutItems, MapSize
exp = GT(MapSize(None, MapPutItems(None, None, {"sku-b": 2, "sku-c": 3}, MapBin("stock"))), 3).compile()as_map_policy mp;as_map_policy_init(&mp);as_hashmap hm;as_hashmap_init(&hm, 2);as_hashmap_set(&hm, (as_val*)as_string_new_strdup("sku-b"), (as_val*)as_integer_new(2));as_hashmap_set(&hm, (as_val*)as_string_new_strdup("sku-c"), (as_val*)as_integer_new(3));as_exp_build(predexp, as_exp_cmp_gt( as_exp_map_size( NULL, as_exp_map_put_items(NULL, &mp, as_exp_val(&hm), as_exp_bin_map("stock"))), as_exp_int(3)));as_hashmap_destroy(&hm);// Requires: import as "github.com/aerospike/aerospike-client-go/v6"putMap := map[any]any{"sku-b": 2, "sku-c": 3}_ = as.ExpGreater( as.ExpMapSize(as.ExpMapPutItems(as.DefaultMapPolicy(), as.ExpMapVal(putMap), as.ExpMapBin("stock"))), as.ExpIntVal(3),)using System.Collections.Generic;
Expression exp = Exp.Build( Exp.GT( MapExp.Size( MapExp.PutItems( MapPolicy.Default, Exp.Val(new Dictionary<string, int> { { "sku-b", 2 }, { "sku-c", 3 } }), Exp.MapBin("stock"))), Exp.Val(3)));const Aerospike = require('aerospike')const exp = Aerospike.exp
const filterExp = exp.gt( exp.maps.size( exp.maps.putItems(exp.binMap('stock'), exp.map({ 'sku-b': 2, 'sku-c': 3 }), null), ), exp.int(3),)map_remove_by_index(context, index, bin)Remove element at index.
| Name | Type |
|---|---|
context | library_specific |
index | integer_expr |
bin | map_bin_expr |
map_bin Hypothetical filter using the map size after removing index 0.
import com.aerospike.client.exp.Expression;import com.aerospike.client.exp.Exp;import com.aerospike.client.exp.MapExp;
Expression exp = Exp.build( Exp.gt(MapExp.size(MapExp.removeByIndex(Exp.val(0), Exp.mapBin("stock"))), Exp.val(0)));from aerospike_helpers.expressions import GT, MapBinfrom aerospike_helpers.expressions.map import MapRemoveByIndex, MapSize
exp = GT(MapSize(None, MapRemoveByIndex(None, 0, MapBin("stock"))), 0).compile()as_exp_build(predexp, as_exp_cmp_gt( as_exp_map_size(NULL, as_exp_map_remove_by_index(NULL, as_exp_int(0), as_exp_bin_map("stock"))), as_exp_int(0)));// Requires: import as "github.com/aerospike/aerospike-client-go/v6"_ = as.ExpGreater( as.ExpMapSize(as.ExpMapRemoveByIndex(as.ExpIntVal(0), as.ExpMapBin("stock"))), as.ExpIntVal(0),)Expression exp = Exp.Build( Exp.GT(MapExp.Size(MapExp.RemoveByIndex(Exp.Val(0), Exp.MapBin("stock"))), Exp.Val(0)));const Aerospike = require('aerospike')const exp = Aerospike.exp
const filterExp = exp.gt( exp.maps.size(exp.maps.removeByIndex(exp.binMap('stock'), exp.int(0))), exp.int(0),)map_remove_by_index_range(context, index, count, bin)Remove count element at index.
| Name | Type |
|---|---|
context | library_specific |
index | integer_expr |
count | integer_expr |
bin | map_bin_expr |
map_bin Hypothetical filter using the map size after removing one entry at index 0.
import com.aerospike.client.cdt.MapReturnType;import com.aerospike.client.exp.Expression;import com.aerospike.client.exp.Exp;import com.aerospike.client.exp.MapExp;
Expression exp = Exp.build( Exp.gt( MapExp.size( MapExp.removeByIndexRange(MapReturnType.NONE, Exp.val(0), Exp.val(1), Exp.mapBin("stock"))), Exp.val(0)));from aerospike_helpers.expressions import GT, MapBinfrom aerospike_helpers.expressions.map import MapRemoveByIndexRange, MapSize
exp = GT(MapSize(None, MapRemoveByIndexRange(None, 0, 1, MapBin("stock"))), 0).compile()as_exp_build(predexp, as_exp_cmp_gt( as_exp_map_size( NULL, as_exp_map_remove_by_index_range( NULL, AS_MAP_RETURN_NONE, as_exp_int(0), as_exp_int(1), as_exp_bin_map("stock"))), as_exp_int(0)));// Requires: import as "github.com/aerospike/aerospike-client-go/v6"_ = as.ExpGreater( as.ExpMapSize( as.ExpMapRemoveByIndexRangeCount( as.MapReturnType.NONE, as.ExpIntVal(0), as.ExpIntVal(1), as.ExpMapBin("stock"), ), ), as.ExpIntVal(0),)Expression exp = Exp.Build( Exp.GT( MapExp.Size( MapExp.RemoveByIndexRange(MapReturnType.NONE, Exp.Val(0), Exp.Val(1), Exp.MapBin("stock"))), Exp.Val(0)));const Aerospike = require('aerospike')const exp = Aerospike.expconst maps = Aerospike.maps
const filterExp = exp.gt( exp.maps.size( exp.maps.removeByIndexRange(exp.binMap('stock'), exp.int(1), exp.int(0), null, maps.returnType.NONE), ), exp.int(0),)map_remove_by_index_range_to_end(context, index, bin)Remove all element at and after index.
| Name | Type |
|---|---|
context | library_specific |
index | integer_expr |
bin | map_bin_expr |
map_bin Hypothetical filter using the map size after removing from index 1 to the end.
import com.aerospike.client.cdt.MapReturnType;import com.aerospike.client.exp.Expression;import com.aerospike.client.exp.Exp;import com.aerospike.client.exp.MapExp;
Expression exp = Exp.build( Exp.gt( MapExp.size(MapExp.removeByIndexRange(MapReturnType.NONE, Exp.val(1), Exp.mapBin("stock"))), Exp.val(0)));from aerospike_helpers.expressions import GT, MapBinfrom aerospike_helpers.expressions.map import MapRemoveByIndexRangeToEnd, MapSize
exp = GT(MapSize(None, MapRemoveByIndexRangeToEnd(None, 1, MapBin("stock"))), 0).compile()as_exp_build(predexp, as_exp_cmp_gt( as_exp_map_size( NULL, as_exp_map_remove_by_index_range_to_end( NULL, AS_MAP_RETURN_NONE, as_exp_int(1), as_exp_bin_map("stock"))), as_exp_int(0)));// Requires: import as "github.com/aerospike/aerospike-client-go/v6"_ = as.ExpGreater( as.ExpMapSize( as.ExpMapRemoveByIndexRange(as.MapReturnType.NONE, as.ExpIntVal(1), as.ExpMapBin("stock")), ), as.ExpIntVal(0),)Expression exp = Exp.Build( Exp.GT( MapExp.Size(MapExp.RemoveByIndexRange(MapReturnType.NONE, Exp.Val(1), Exp.MapBin("stock"))), Exp.Val(0)));const Aerospike = require('aerospike')const exp = Aerospike.expconst maps = Aerospike.maps
const filterExp = exp.gt( exp.maps.size( exp.maps.removeByIndexRangeToEnd(exp.binMap('stock'), exp.int(1), null, maps.returnType.NONE), ), exp.int(0),)map_remove_by_key(context, key, bin)Remove element with key key.
| Name | Type |
|---|---|
context | library_specific |
key | expr |
bin | map_bin_expr |
map_bin Hypothetical filter using the map size after removing key sku-a.
import com.aerospike.client.exp.Expression;import com.aerospike.client.exp.Exp;import com.aerospike.client.exp.MapExp;
Expression exp = Exp.build( Exp.eq(MapExp.size(MapExp.removeByKey(Exp.val("sku-a"), Exp.mapBin("stock"))), Exp.val(2)));from aerospike_helpers.expressions import Eq, MapBinfrom aerospike_helpers.expressions.map import MapRemoveByKey, MapSize
exp = Eq(MapSize(None, MapRemoveByKey(None, "sku-a", MapBin("stock"))), 2).compile()as_exp_build(predexp, as_exp_cmp_eq( as_exp_map_size(NULL, as_exp_map_remove_by_key(NULL, as_exp_str("sku-a"), as_exp_bin_map("stock"))), as_exp_int(2)));// Requires: import as "github.com/aerospike/aerospike-client-go/v6"_ = as.ExpEq( as.ExpMapSize(as.ExpMapRemoveByKey(as.ExpStringVal("sku-a"), as.ExpMapBin("stock"))), as.ExpIntVal(2),)Expression exp = Exp.Build( Exp.EQ(MapExp.Size(MapExp.RemoveByKey(Exp.Val("sku-a"), Exp.MapBin("stock"))), Exp.Val(2)));const Aerospike = require('aerospike')const exp = Aerospike.exp
const filterExp = exp.eq(exp.maps.size(exp.maps.removeByKey(exp.binMap('stock'), exp.str('sku-a'))), exp.int(2))map_remove_by_key_list(context, keys, bin)Remove all elements where key ∈ keys.
| Name | Type |
|---|---|
context | library_specific |
keys | list_expr |
bin | map_bin_expr |
map_bin Hypothetical filter using the map size after removing two keys.
import com.aerospike.client.cdt.MapReturnType;import com.aerospike.client.exp.Expression;import com.aerospike.client.exp.Exp;import com.aerospike.client.exp.MapExp;
import java.util.Arrays;
Expression exp = Exp.build( Exp.eq( MapExp.size( MapExp.removeByKeyList( MapReturnType.NONE, Exp.val(Arrays.asList("sku-a", "sku-b")), Exp.mapBin("stock"))), Exp.val(1)));from aerospike_helpers.expressions import Eq, MapBinfrom aerospike_helpers.expressions.map import MapRemoveByKeyList, MapSize
exp = Eq(MapSize(None, MapRemoveByKeyList(None, ["sku-a", "sku-b"], MapBin("stock"))), 1).compile()as_arraylist rk;as_arraylist_init(&rk, 2, 2);as_arraylist_append_str(&rk, "sku-a");as_arraylist_append_str(&rk, "sku-b");as_exp_build(predexp, as_exp_cmp_eq( as_exp_map_size( NULL, as_exp_map_remove_by_key_list(NULL, AS_MAP_RETURN_NONE, as_exp_val(&rk), as_exp_bin_map("stock"))), as_exp_int(1)));as_arraylist_destroy(&rk);// Requires: import as "github.com/aerospike/aerospike-client-go/v6"_ = as.ExpEq( as.ExpMapSize( as.ExpMapRemoveByKeyList( as.MapReturnType.NONE, as.ExpListVal(as.NewValue("sku-a"), as.NewValue("sku-b")), as.ExpMapBin("stock"), ), ), as.ExpIntVal(1),)using System.Collections.Generic;
Expression exp = Exp.Build( Exp.EQ( MapExp.Size( MapExp.RemoveByKeyList(MapReturnType.NONE, Exp.Val(new List<string> { "sku-a", "sku-b" }), Exp.MapBin("stock"))), Exp.Val(1)));const Aerospike = require('aerospike')const exp = Aerospike.expconst maps = Aerospike.maps
const filterExp = exp.eq( exp.maps.size( exp.maps.removeByKeyList(exp.binMap('stock'), exp.list(['sku-a', 'sku-b']), null, maps.returnType.NONE), ), exp.int(1),)map_remove_by_key_range(context, start, end, bin)Remove all elements with key k in interval start ≤ k < end.
| Name | Type |
|---|---|
context | library_specific |
start | expr |
end | expr |
bin | map_bin_expr |
map_bin Hypothetical filter using the map size after removing a key interval.
import com.aerospike.client.cdt.MapReturnType;import com.aerospike.client.exp.Expression;import com.aerospike.client.exp.Exp;import com.aerospike.client.exp.MapExp;
Expression exp = Exp.build( Exp.gt( MapExp.size( MapExp.removeByKeyRange( MapReturnType.NONE, Exp.val("sku-a"), Exp.val("sku-z"), Exp.mapBin("stock"))), Exp.val(0)));from aerospike_helpers.expressions import GT, MapBinfrom aerospike_helpers.expressions.map import MapRemoveByKeyRange, MapSize
exp = GT(MapSize(None, MapRemoveByKeyRange(None, "sku-a", "sku-z", MapBin("stock"))), 0).compile()as_exp_build(predexp, as_exp_cmp_gt( as_exp_map_size( NULL, as_exp_map_remove_by_key_range( NULL, AS_MAP_RETURN_NONE, as_exp_str("sku-a"), as_exp_str("sku-z"), as_exp_bin_map("stock"))), as_exp_int(0)));// Requires: import as "github.com/aerospike/aerospike-client-go/v6"_ = as.ExpGreater( as.ExpMapSize( as.ExpMapRemoveByKeyRange( as.MapReturnType.NONE, as.ExpStringVal("sku-a"), as.ExpStringVal("sku-z"), as.ExpMapBin("stock"), ), ), as.ExpIntVal(0),)Expression exp = Exp.Build( Exp.GT( MapExp.Size( MapExp.RemoveByKeyRange(MapReturnType.NONE, Exp.Val("sku-a"), Exp.Val("sku-z"), Exp.MapBin("stock"))), Exp.Val(0)));const Aerospike = require('aerospike')const exp = Aerospike.expconst maps = Aerospike.maps
const filterExp = exp.gt( exp.maps.size( exp.maps.removeByKeyRange( exp.binMap('stock'), exp.str('sku-z'), exp.str('sku-a'), null, maps.returnType.NONE, ), ), exp.int(0),)map_remove_by_rank(context, rank, bin)Remove all element with rank rank.
| Name | Type |
|---|---|
context | library_specific |
rank | integer_expr |
bin | map_bin_expr |
map_bin Hypothetical filter using the map size after removing rank 0.
import com.aerospike.client.exp.Expression;import com.aerospike.client.exp.Exp;import com.aerospike.client.exp.MapExp;
Expression exp = Exp.build( Exp.gt(MapExp.size(MapExp.removeByRank(Exp.val(0), Exp.mapBin("stock"))), Exp.val(0)));from aerospike_helpers.expressions import GT, MapBinfrom aerospike_helpers.expressions.map import MapRemoveByRank, MapSize
exp = GT(MapSize(None, MapRemoveByRank(None, 0, MapBin("stock"))), 0).compile()as_exp_build(predexp, as_exp_cmp_gt( as_exp_map_size(NULL, as_exp_map_remove_by_rank(NULL, as_exp_int(0), as_exp_bin_map("stock"))), as_exp_int(0)));// Requires: import as "github.com/aerospike/aerospike-client-go/v6"_ = as.ExpGreater( as.ExpMapSize(as.ExpMapRemoveByRank(as.ExpIntVal(0), as.ExpMapBin("stock"))), as.ExpIntVal(0),)Expression exp = Exp.Build( Exp.GT(MapExp.Size(MapExp.RemoveByRank(Exp.Val(0), Exp.MapBin("stock"))), Exp.Val(0)));const Aerospike = require('aerospike')const exp = Aerospike.exp
const filterExp = exp.gt( exp.maps.size(exp.maps.removeByRank(exp.binMap('stock'), exp.int(0))), exp.int(0),)map_remove_by_rank_range(context, rank, count, bin)Remove count element at rank.
| Name | Type |
|---|---|
context | library_specific |
rank | integer_expr |
count | integer_expr |
bin | map_bin_expr |
map_bin Hypothetical filter using the map size after removing two ranks starting at 0.
import com.aerospike.client.cdt.MapReturnType;import com.aerospike.client.exp.Expression;import com.aerospike.client.exp.Exp;import com.aerospike.client.exp.MapExp;
Expression exp = Exp.build( Exp.gt( MapExp.size( MapExp.removeByRankRange(MapReturnType.NONE, Exp.val(0), Exp.val(2), Exp.mapBin("stock"))), Exp.val(0)));from aerospike_helpers.expressions import GT, MapBinfrom aerospike_helpers.expressions.map import MapRemoveByRankRange, MapSize
exp = GT(MapSize(None, MapRemoveByRankRange(None, 0, 2, MapBin("stock"))), 0).compile()as_exp_build(predexp, as_exp_cmp_gt( as_exp_map_size( NULL, as_exp_map_remove_by_rank_range( NULL, AS_MAP_RETURN_NONE, as_exp_int(0), as_exp_int(2), as_exp_bin_map("stock"))), as_exp_int(0)));// Requires: import as "github.com/aerospike/aerospike-client-go/v6"_ = as.ExpGreater( as.ExpMapSize( as.ExpMapRemoveByRankRangeCount( as.MapReturnType.NONE, as.ExpIntVal(0), as.ExpIntVal(2), as.ExpMapBin("stock"), ), ), as.ExpIntVal(0),)Expression exp = Exp.Build( Exp.GT( MapExp.Size( MapExp.RemoveByRankRange(MapReturnType.NONE, Exp.Val(0), Exp.Val(2), Exp.MapBin("stock"))), Exp.Val(0)));const Aerospike = require('aerospike')const exp = Aerospike.expconst maps = Aerospike.maps
const filterExp = exp.gt( exp.maps.size( exp.maps.removeByRankRange(exp.binMap('stock'), exp.int(2), exp.int(0), null, maps.returnType.NONE), ), exp.int(0),)map_remove_by_rank_range_to_end(context, rank, bin)Remove all elements at and after rank.
| Name | Type |
|---|---|
context | library_specific |
rank | integer_expr |
bin | map_bin_expr |
map_bin Hypothetical filter using the map size after removing from rank 0 to the last rank.
import com.aerospike.client.cdt.MapReturnType;import com.aerospike.client.exp.Expression;import com.aerospike.client.exp.Exp;import com.aerospike.client.exp.MapExp;
Expression exp = Exp.build( Exp.gt( MapExp.size(MapExp.removeByRankRange(MapReturnType.NONE, Exp.val(0), Exp.mapBin("stock"))), Exp.val(0)));from aerospike_helpers.expressions import GT, MapBinfrom aerospike_helpers.expressions.map import MapRemoveByRankRangeToEnd, MapSize
exp = GT(MapSize(None, MapRemoveByRankRangeToEnd(None, 0, MapBin("stock"))), 0).compile()as_exp_build(predexp, as_exp_cmp_gt( as_exp_map_size( NULL, as_exp_map_remove_by_rank_range_to_end( NULL, AS_MAP_RETURN_NONE, as_exp_int(0), as_exp_bin_map("stock"))), as_exp_int(0)));// Requires: import as "github.com/aerospike/aerospike-client-go/v6"_ = as.ExpGreater( as.ExpMapSize( as.ExpMapRemoveByRankRange(as.MapReturnType.NONE, as.ExpIntVal(0), as.ExpMapBin("stock")), ), as.ExpIntVal(0),)Expression exp = Exp.Build( Exp.GT( MapExp.Size(MapExp.RemoveByRankRange(MapReturnType.NONE, Exp.Val(0), Exp.MapBin("stock"))), Exp.Val(0)));const Aerospike = require('aerospike')const exp = Aerospike.expconst maps = Aerospike.maps
const filterExp = exp.gt( exp.maps.size( exp.maps.removeByRankRangeToEnd(exp.binMap('stock'), exp.int(0), null, maps.returnType.NONE), ), exp.int(0),)map_remove_by_rel_index_range(context, key, index, count, bin)Remove count elements at index relative to key.
| Name | Type |
|---|---|
context | library_specific |
key | expr |
index | integer_expr |
count | integer_expr |
bin | map_bin_expr |
map_bin Hypothetical filter using the map size after a key-relative index remove with count.
import com.aerospike.client.cdt.MapReturnType;import com.aerospike.client.exp.Expression;import com.aerospike.client.exp.Exp;import com.aerospike.client.exp.MapExp;
Expression exp = Exp.build( Exp.gt( MapExp.size( MapExp.removeByKeyRelativeIndexRange( MapReturnType.NONE, Exp.val("sku-a"), Exp.val(0), Exp.val(1), Exp.mapBin("stock"))), Exp.val(0)));from aerospike_helpers.expressions import GT, MapBinfrom aerospike_helpers.expressions.map import MapRemoveByKeyRelIndexRange, MapSize
exp = GT( MapSize(None, MapRemoveByKeyRelIndexRange(None, "sku-a", 0, 1, MapBin("stock"))), 0,).compile()as_exp_build(predexp, as_exp_cmp_gt( as_exp_map_size( NULL, as_exp_map_remove_by_key_rel_index_range( NULL, AS_MAP_RETURN_NONE, as_exp_str("sku-a"), as_exp_int(0), as_exp_int(1), as_exp_bin_map("stock"))), as_exp_int(0)));// Requires: import as "github.com/aerospike/aerospike-client-go/v6"_ = as.ExpGreater( as.ExpMapSize( as.ExpMapRemoveByKeyRelativeIndexRangeCount( as.MapReturnType.NONE, as.ExpStringVal("sku-a"), as.ExpIntVal(0), as.ExpIntVal(1), as.ExpMapBin("stock"), ), ), as.ExpIntVal(0),)Expression exp = Exp.Build( Exp.GT( MapExp.Size( MapExp.RemoveByKeyRelativeIndexRange( MapReturnType.NONE, Exp.Val("sku-a"), Exp.Val(0), Exp.Val(1), Exp.MapBin("stock"))), Exp.Val(0)));const Aerospike = require('aerospike')const exp = Aerospike.expconst maps = Aerospike.maps
const filterExp = exp.gt( exp.maps.size( exp.maps.removeByKeyRelIndexRange( exp.binMap('stock'), exp.int(1), exp.int(0), exp.str('sku-a'), null, maps.returnType.NONE, ), ), exp.int(0),)map_remove_by_rel_index_range_to_end(context, key, index, bin)Remove all elements at and after index relative to key.
| Name | Type |
|---|---|
context | library_specific |
key | expr |
index | integer_expr |
bin | map_bin_expr |
map_bin Hypothetical filter using the map size after a key-relative index remove to end.
import com.aerospike.client.cdt.MapReturnType;import com.aerospike.client.exp.Expression;import com.aerospike.client.exp.Exp;import com.aerospike.client.exp.MapExp;
Expression exp = Exp.build( Exp.gt( MapExp.size( MapExp.removeByKeyRelativeIndexRange( MapReturnType.NONE, Exp.val("sku-a"), Exp.val(0), Exp.mapBin("stock"))), Exp.val(0)));from aerospike_helpers.expressions import GT, MapBinfrom aerospike_helpers.expressions.map import MapRemoveByKeyRelIndexRangeToEnd, MapSize
exp = GT(MapSize(None, MapRemoveByKeyRelIndexRangeToEnd(None, "sku-a", 0, MapBin("stock"))), 0).compile()as_exp_build(predexp, as_exp_cmp_gt( as_exp_map_size( NULL, as_exp_map_remove_by_key_rel_index_range_to_end( NULL, AS_MAP_RETURN_NONE, as_exp_str("sku-a"), as_exp_int(0), as_exp_bin_map("stock"))), as_exp_int(0)));// Requires: import as "github.com/aerospike/aerospike-client-go/v6"_ = as.ExpGreater( as.ExpMapSize( as.ExpMapRemoveByKeyRelativeIndexRange( as.MapReturnType.NONE, as.ExpStringVal("sku-a"), as.ExpIntVal(0), as.ExpMapBin("stock"), ), ), as.ExpIntVal(0),)Expression exp = Exp.Build( Exp.GT( MapExp.Size( MapExp.RemoveByKeyRelativeIndexRange(MapReturnType.NONE, Exp.Val("sku-a"), Exp.Val(0), Exp.MapBin("stock"))), Exp.Val(0)));const Aerospike = require('aerospike')const exp = Aerospike.expconst maps = Aerospike.maps
const filterExp = exp.gt( exp.maps.size( exp.maps.removeByKeyRelIndexRangeToEnd( exp.binMap('stock'), exp.int(0), exp.str('sku-a'), null, maps.returnType.NONE, ), ), exp.int(0),)map_remove_by_rel_rank_range(context, value, rank, count, bin)Remove count elements at rank relative to value.
| Name | Type |
|---|---|
context | library_specific |
value | expr |
rank | integer_expr |
count | integer_expr |
bin | map_bin_expr |
map_bin Hypothetical filter using the map size after a value-relative rank remove with count.
import com.aerospike.client.cdt.MapReturnType;import com.aerospike.client.exp.Expression;import com.aerospike.client.exp.Exp;import com.aerospike.client.exp.MapExp;
Expression exp = Exp.build( Exp.gt( MapExp.size( MapExp.removeByValueRelativeRankRange( MapReturnType.NONE, Exp.val(5), Exp.val(0), Exp.val(2), Exp.mapBin("stock"))), Exp.val(0)));from aerospike_helpers.expressions import GT, MapBinfrom aerospike_helpers.expressions.map import MapRemoveByValueRelRankRange, MapSize
exp = GT(MapSize(None, MapRemoveByValueRelRankRange(None, 5, 0, 2, MapBin("stock"))), 0).compile()as_exp_build(predexp, as_exp_cmp_gt( as_exp_map_size( NULL, as_exp_map_remove_by_value_rel_rank_range( NULL, AS_MAP_RETURN_NONE, as_exp_int(5), as_exp_int(0), as_exp_int(2), as_exp_bin_map("stock"))), as_exp_int(0)));// Requires: import as "github.com/aerospike/aerospike-client-go/v6"_ = as.ExpGreater( as.ExpMapSize( as.ExpMapRemoveByValueRelativeRankRangeCount( as.MapReturnType.NONE, as.ExpIntVal(5), as.ExpIntVal(0), as.ExpIntVal(2), as.ExpMapBin("stock"), ), ), as.ExpIntVal(0),)Expression exp = Exp.Build( Exp.GT( MapExp.Size( MapExp.RemoveByValueRelativeRankRange( MapReturnType.NONE, Exp.Val(5), Exp.Val(0), Exp.Val(2), Exp.MapBin("stock"))), Exp.Val(0)));const Aerospike = require('aerospike')const exp = Aerospike.expconst maps = Aerospike.maps
const filterExp = exp.gt( exp.maps.size( exp.maps.removeByValueRelRankRange( exp.binMap('stock'), exp.int(2), exp.int(0), exp.int(5), null, maps.returnType.NONE, ), ), exp.int(0),)map_remove_by_rel_rank_range_to_end(context, value, rank, bin)Remove all elements at and after rank relative to value.
| Name | Type |
|---|---|
context | library_specific |
value | expr |
rank | integer_expr |
bin | map_bin_expr |
map_bin Hypothetical filter using the map size after a value-relative rank remove to end.
import com.aerospike.client.cdt.MapReturnType;import com.aerospike.client.exp.Expression;import com.aerospike.client.exp.Exp;import com.aerospike.client.exp.MapExp;
Expression exp = Exp.build( Exp.gt( MapExp.size( MapExp.removeByValueRelativeRankRange(MapReturnType.NONE, Exp.val(5), Exp.val(0), Exp.mapBin("stock"))), Exp.val(0)));from aerospike_helpers.expressions import GT, MapBinfrom aerospike_helpers.expressions.map import MapRemoveByValueRelRankRangeToEnd, MapSize
exp = GT(MapSize(None, MapRemoveByValueRelRankRangeToEnd(None, 5, 0, MapBin("stock"))), 0).compile()as_exp_build(predexp, as_exp_cmp_gt( as_exp_map_size( NULL, as_exp_map_remove_by_value_rel_rank_range_to_end( NULL, AS_MAP_RETURN_NONE, as_exp_int(5), as_exp_int(0), as_exp_bin_map("stock"))), as_exp_int(0)));// Requires: import as "github.com/aerospike/aerospike-client-go/v6"_ = as.ExpGreater( as.ExpMapSize( as.ExpMapRemoveByValueRelativeRankRange( as.MapReturnType.NONE, as.ExpIntVal(5), as.ExpIntVal(0), as.ExpMapBin("stock"), ), ), as.ExpIntVal(0),)Expression exp = Exp.Build( Exp.GT( MapExp.Size( MapExp.RemoveByValueRelativeRankRange(MapReturnType.NONE, Exp.Val(5), Exp.Val(0), Exp.MapBin("stock"))), Exp.Val(0)));const Aerospike = require('aerospike')const exp = Aerospike.expconst maps = Aerospike.maps
const filterExp = exp.gt( exp.maps.size( exp.maps.removeByValueRelRankRangeToEnd( exp.binMap('stock'), exp.int(0), exp.int(5), null, maps.returnType.NONE, ), ), exp.int(0),)map_remove_by_value(context, value, bin)Remove all element with value value.
| Name | Type |
|---|---|
context | library_specific |
value | expr |
bin | map_bin_expr |
map_bin Hypothetical filter using the map size after removing by value 12.
import com.aerospike.client.cdt.MapReturnType;import com.aerospike.client.exp.Expression;import com.aerospike.client.exp.Exp;import com.aerospike.client.exp.MapExp;
Expression exp = Exp.build( Exp.gt(MapExp.size(MapExp.removeByValue(MapReturnType.NONE, Exp.val(12), Exp.mapBin("stock"))), Exp.val(0)));from aerospike_helpers.expressions import GT, MapBinfrom aerospike_helpers.expressions.map import MapRemoveByValue, MapSize
exp = GT(MapSize(None, MapRemoveByValue(None, 12, MapBin("stock"))), 0).compile()as_exp_build(predexp, as_exp_cmp_gt( as_exp_map_size( NULL, as_exp_map_remove_by_value(NULL, AS_MAP_RETURN_NONE, as_exp_int(12), as_exp_bin_map("stock"))), as_exp_int(0)));// Requires: import as "github.com/aerospike/aerospike-client-go/v6"_ = as.ExpGreater( as.ExpMapSize( as.ExpMapRemoveByValue(as.MapReturnType.NONE, as.ExpIntVal(12), as.ExpMapBin("stock")), ), as.ExpIntVal(0),)Expression exp = Exp.Build( Exp.GT( MapExp.Size(MapExp.RemoveByValue(MapReturnType.NONE, Exp.Val(12), Exp.MapBin("stock"))), Exp.Val(0)));const Aerospike = require('aerospike')const exp = Aerospike.expconst maps = Aerospike.maps
const filterExp = exp.gt( exp.maps.size(exp.maps.removeByValue(exp.binMap('stock'), exp.int(12), null, maps.returnType.NONE)), exp.int(0),)map_remove_by_value_list(context, values, bin)Remove all elements where value ∈ values.
| Name | Type |
|---|---|
context | library_specific |
values | list_expr |
bin | map_bin_expr |
map_bin Hypothetical filter using the map size after removing by values 5 and 12.
import com.aerospike.client.cdt.MapReturnType;import com.aerospike.client.exp.Expression;import com.aerospike.client.exp.Exp;import com.aerospike.client.exp.MapExp;
import java.util.Arrays;
Expression exp = Exp.build( Exp.gt( MapExp.size( MapExp.removeByValueList(MapReturnType.NONE, Exp.val(Arrays.asList(5, 12)), Exp.mapBin("stock"))), Exp.val(0)));from aerospike_helpers.expressions import GT, MapBinfrom aerospike_helpers.expressions.map import MapRemoveByValueList, MapSize
exp = GT(MapSize(None, MapRemoveByValueList(None, [5, 12], MapBin("stock"))), 0).compile()as_arraylist rv;as_arraylist_init(&rv, 2, 2);as_arraylist_append_int64(&rv, 5);as_arraylist_append_int64(&rv, 12);as_exp_build(predexp, as_exp_cmp_gt( as_exp_map_size( NULL, as_exp_map_remove_by_value_list(NULL, AS_MAP_RETURN_NONE, as_exp_val(&rv), as_exp_bin_map("stock"))), as_exp_int(0)));as_arraylist_destroy(&rv);// Requires: import as "github.com/aerospike/aerospike-client-go/v6"_ = as.ExpGreater( as.ExpMapSize( as.ExpMapRemoveByValueList( as.MapReturnType.NONE, as.ExpListVal(as.NewValue(5), as.NewValue(12)), as.ExpMapBin("stock"), ), ), as.ExpIntVal(0),)using System.Collections.Generic;
Expression exp = Exp.Build( Exp.GT( MapExp.Size( MapExp.RemoveByValueList(MapReturnType.NONE, Exp.Val(new List<long> { 5, 12 }), Exp.MapBin("stock"))), Exp.Val(0)));const Aerospike = require('aerospike')const exp = Aerospike.expconst maps = Aerospike.maps
const filterExp = exp.gt( exp.maps.size( exp.maps.removeByValueList(exp.binMap('stock'), exp.list([5, 12]), null, maps.returnType.NONE), ), exp.int(0),)map_remove_by_value_range(context, start, end, bin)Remove all elements with value v in interval start ≤ v < end.
| Name | Type |
|---|---|
context | library_specific |
start | expr |
end | expr |
bin | map_bin_expr |
map_bin Hypothetical filter using the map size after removing values in [5, 20).
import com.aerospike.client.cdt.MapReturnType;import com.aerospike.client.exp.Expression;import com.aerospike.client.exp.Exp;import com.aerospike.client.exp.MapExp;
Expression exp = Exp.build( Exp.gt( MapExp.size( MapExp.removeByValueRange(MapReturnType.NONE, Exp.val(5), Exp.val(20), Exp.mapBin("stock"))), Exp.val(0)));from aerospike_helpers.expressions import GT, MapBinfrom aerospike_helpers.expressions.map import MapRemoveByValueRange, MapSize
exp = GT(MapSize(None, MapRemoveByValueRange(None, 5, 20, MapBin("stock"))), 0).compile()as_exp_build(predexp, as_exp_cmp_gt( as_exp_map_size( NULL, as_exp_map_remove_by_value_range( NULL, AS_MAP_RETURN_NONE, as_exp_int(5), as_exp_int(20), as_exp_bin_map("stock"))), as_exp_int(0)));// Requires: import as "github.com/aerospike/aerospike-client-go/v6"_ = as.ExpGreater( as.ExpMapSize( as.ExpMapRemoveByValueRange( as.MapReturnType.NONE, as.ExpIntVal(5), as.ExpIntVal(20), as.ExpMapBin("stock"), ), ), as.ExpIntVal(0),)Expression exp = Exp.Build( Exp.GT( MapExp.Size( MapExp.RemoveByValueRange(MapReturnType.NONE, Exp.Val(5), Exp.Val(20), Exp.MapBin("stock"))), Exp.Val(0)));const Aerospike = require('aerospike')const exp = Aerospike.expconst maps = Aerospike.maps
const filterExp = exp.gt( exp.maps.size( exp.maps.removeByValueRange(exp.binMap('stock'), exp.int(20), exp.int(5), null, maps.returnType.NONE), ), exp.int(0),)Read
map_get_by_index(type, context, result_type, index, bin)Get element at index.
| Name | Type |
|---|---|
type | integer_value |
context | library_specific |
result_type | integer_value |
index | integer_expr |
bin | map_bin_expr |
Filter where the integer value at map index 0 equals 12.
import com.aerospike.client.cdt.MapReturnType;import com.aerospike.client.exp.Expression;import com.aerospike.client.exp.Exp;import com.aerospike.client.exp.MapExp;
Expression exp = Exp.build( Exp.eq( MapExp.getByIndex(MapReturnType.VALUE, Exp.Type.INT, Exp.val(0), Exp.mapBin("stock")), Exp.val(12)));import aerospikefrom aerospike_helpers.expressions import Eq, MapBin, ResultTypefrom aerospike_helpers.expressions.map import MapGetByIndex
exp = Eq( MapGetByIndex(None, aerospike.MAP_RETURN_VALUE, ResultType.INTEGER, 0, MapBin("stock")), 12,).compile()as_exp_build(predexp, as_exp_cmp_eq( as_exp_map_get_by_index( NULL, AS_MAP_RETURN_VALUE, AS_EXP_TYPE_INT, as_exp_int(0), as_exp_bin_map("stock")), as_exp_int(12)));// Requires: import as "github.com/aerospike/aerospike-client-go/v6"_ = as.ExpEq( as.ExpMapGetByIndex(as.MapReturnType.VALUE, as.ExpTypeINT, as.ExpIntVal(0), as.ExpMapBin("stock")), as.ExpIntVal(12),)Expression exp = Exp.Build( Exp.EQ( MapExp.GetByIndex(MapReturnType.VALUE, Exp.Type.INT, Exp.Val(0), Exp.MapBin("stock")), Exp.Val(12)));const Aerospike = require('aerospike')const exp = Aerospike.expconst maps = Aerospike.maps
const filterExp = exp.eq( exp.maps.getByIndex(exp.binMap('stock'), exp.int(0), exp.type.INT, maps.returnType.VALUE), exp.int(12),)map_get_by_index_range(context, result_type, index, count, bin)Get count elements at index.
| Name | Type |
|---|---|
context | library_specific |
result_type | integer_value |
index | integer_expr |
count | integer_expr |
bin | map_bin_expr |
Filter where two entries exist starting at map index 0.
import com.aerospike.client.cdt.MapReturnType;import com.aerospike.client.exp.Expression;import com.aerospike.client.exp.Exp;import com.aerospike.client.exp.MapExp;
Expression exp = Exp.build( Exp.eq( MapExp.getByIndexRange(MapReturnType.COUNT, Exp.val(0), Exp.val(2), Exp.mapBin("stock")), Exp.val(2)));import aerospikefrom aerospike_helpers.expressions import Eq, MapBinfrom aerospike_helpers.expressions.map import MapGetByIndexRange
exp = Eq( MapGetByIndexRange(None, aerospike.MAP_RETURN_COUNT, 0, 2, MapBin("stock")), 2,).compile()as_exp_build(predexp, as_exp_cmp_eq( as_exp_map_get_by_index_range( NULL, AS_MAP_RETURN_COUNT, as_exp_int(0), as_exp_int(2), as_exp_bin_map("stock")), as_exp_int(2)));// Requires: import as "github.com/aerospike/aerospike-client-go/v6"_ = as.ExpEq( as.ExpMapGetByIndexRangeCount( as.MapReturnType.COUNT, as.ExpIntVal(0), as.ExpIntVal(2), as.ExpMapBin("stock"), ), as.ExpIntVal(2),)Expression exp = Exp.Build( Exp.EQ( MapExp.GetByIndexRange(MapReturnType.COUNT, Exp.Val(0), Exp.Val(2), Exp.MapBin("stock")), Exp.Val(2)));const Aerospike = require('aerospike')const exp = Aerospike.expconst maps = Aerospike.maps
const filterExp = exp.eq( exp.maps.getByIndexRange(exp.binMap('stock'), exp.int(2), exp.int(0), maps.returnType.COUNT), exp.int(2),)map_get_by_index_range_to_end(context, result_type, index, bin)Get elements at and after index.
| Name | Type |
|---|---|
context | library_specific |
result_type | integer_value |
index | integer_expr |
bin | map_bin_expr |
Filter where the count from index 1 to the end is positive.
import com.aerospike.client.cdt.MapReturnType;import com.aerospike.client.exp.Expression;import com.aerospike.client.exp.Exp;import com.aerospike.client.exp.MapExp;
Expression exp = Exp.build( Exp.gt(MapExp.getByIndexRange(MapReturnType.COUNT, Exp.val(1), Exp.mapBin("stock")), Exp.val(0)));import aerospikefrom aerospike_helpers.expressions import GT, MapBinfrom aerospike_helpers.expressions.map import MapGetByIndexRangeToEnd
exp = GT(MapGetByIndexRangeToEnd(None, aerospike.MAP_RETURN_COUNT, 1, MapBin("stock")), 0).compile()as_exp_build(predexp, as_exp_cmp_gt( as_exp_map_get_by_index_range_to_end( NULL, AS_MAP_RETURN_COUNT, as_exp_int(1), as_exp_bin_map("stock")), as_exp_int(0)));// Requires: import as "github.com/aerospike/aerospike-client-go/v6"_ = as.ExpGreater( as.ExpMapGetByIndexRange(as.MapReturnType.COUNT, as.ExpIntVal(1), as.ExpMapBin("stock")), as.ExpIntVal(0),)Expression exp = Exp.Build( Exp.GT( MapExp.GetByIndexRange(MapReturnType.COUNT, Exp.Val(1), Exp.MapBin("stock")), Exp.Val(0)));const Aerospike = require('aerospike')const exp = Aerospike.expconst maps = Aerospike.maps
const filterExp = exp.gt( exp.maps.getByIndexRangeToEnd(exp.binMap('stock'), exp.int(1), maps.returnType.COUNT), exp.int(0),)map_get_by_key(type, context, result_type, key, bin)Get element with key == key.
| Name | Type |
|---|---|
type | integer_value |
context | library_specific |
result_type | integer_value |
key | expr |
bin | map_bin_expr |
Filter where the integer value at key sku-a in stock equals 12.
import com.aerospike.client.cdt.MapReturnType;import com.aerospike.client.exp.Expression;import com.aerospike.client.exp.Exp;import com.aerospike.client.exp.MapExp;
Expression exp = Exp.build( Exp.eq( MapExp.getByKey(MapReturnType.VALUE, Exp.Type.INT, Exp.val("sku-a"), Exp.mapBin("stock")), Exp.val(12)));import aerospikefrom aerospike_helpers.expressions import Eq, MapBin, ResultTypefrom aerospike_helpers.expressions.map import MapGetByKey
exp = Eq( MapGetByKey(None, aerospike.MAP_RETURN_VALUE, ResultType.INTEGER, "sku-a", MapBin("stock")), 12,).compile()as_exp_build(predexp, as_exp_cmp_eq( as_exp_map_get_by_key( NULL, AS_MAP_RETURN_VALUE, AS_EXP_TYPE_INT, as_exp_str("sku-a"), as_exp_bin_map("stock")), as_exp_int(12)));// Requires: import as "github.com/aerospike/aerospike-client-go/v6"_ = as.ExpEq( as.ExpMapGetByKey(as.MapReturnType.VALUE, as.ExpTypeINT, as.ExpStringVal("sku-a"), as.ExpMapBin("stock")), as.ExpIntVal(12),)Expression exp = Exp.Build( Exp.EQ( MapExp.GetByKey(MapReturnType.VALUE, Exp.Type.INT, Exp.Val("sku-a"), Exp.MapBin("stock")), Exp.Val(12)));const Aerospike = require('aerospike')const exp = Aerospike.expconst maps = Aerospike.maps
const filterExp = exp.eq( exp.maps.getByKey(exp.binMap('stock'), exp.str('sku-a'), exp.type.INT, maps.returnType.VALUE), exp.int(12),)map_get_by_key_list(context, result_type, keys, bin)Get all elements where key ∈ keys.
| Name | Type |
|---|---|
context | library_specific |
result_type | integer_value |
keys | list_expr |
bin | map_bin_expr |
Filter where the map has positive COUNT for keys sku-a and sku-b in stock.
import com.aerospike.client.cdt.MapReturnType;import com.aerospike.client.exp.Expression;import com.aerospike.client.exp.Exp;import com.aerospike.client.exp.MapExp;
import java.util.Arrays;
Expression exp = Exp.build( Exp.gt( MapExp.getByKeyList( MapReturnType.COUNT, Exp.val(Arrays.asList("sku-a", "sku-b")), Exp.mapBin("stock")), Exp.val(0)));import aerospikefrom aerospike_helpers.expressions import GT, MapBinfrom aerospike_helpers.expressions.map import MapGetByKeyList
exp = GT( MapGetByKeyList(None, aerospike.MAP_RETURN_COUNT, ["sku-a", "sku-b"], MapBin("stock")), 0,).compile()as_arraylist kl;as_arraylist_init(&kl, 2, 2);as_arraylist_append_str(&kl, "sku-a");as_arraylist_append_str(&kl, "sku-b");as_exp_build(predexp, as_exp_cmp_gt( as_exp_map_get_by_key_list( NULL, AS_MAP_RETURN_COUNT, as_exp_val(&kl), as_exp_bin_map("stock")), as_exp_int(0)));as_arraylist_destroy(&kl);// Requires: import as "github.com/aerospike/aerospike-client-go/v6"_ = as.ExpGreater( as.ExpMapGetByKeyList( as.MapReturnType.COUNT, as.ExpListVal(as.NewValue("sku-a"), as.NewValue("sku-b")), as.ExpMapBin("stock"), ), as.ExpIntVal(0),)using System.Collections.Generic;
Expression exp = Exp.Build( Exp.GT( MapExp.GetByKeyList(MapReturnType.COUNT, Exp.Val(new List<string> { "sku-a", "sku-b" }), Exp.MapBin("stock")), Exp.Val(0)));const Aerospike = require('aerospike')const exp = Aerospike.expconst maps = Aerospike.maps
const filterExp = exp.gt( exp.maps.getByKeyList(exp.binMap('stock'), exp.list(['sku-a', 'sku-b']), maps.returnType.COUNT), exp.int(0),)map_get_by_key_range(context, result_type, start, end, bin)Get all elements with key k in interval start ≤ k < end.
| Name | Type |
|---|---|
context | library_specific |
result_type | integer_value |
start | expr |
end | expr |
bin | map_bin_expr |
Filter where the count of map entries with keys less than sku-z is positive.
import com.aerospike.client.cdt.MapReturnType;import com.aerospike.client.exp.Expression;import com.aerospike.client.exp.Exp;import com.aerospike.client.exp.MapExp;
Expression exp = Exp.build( Exp.gt( MapExp.getByKeyRange(MapReturnType.COUNT, Exp.val((String) null), Exp.val("sku-z"), Exp.mapBin("stock")), Exp.val(0)));import aerospikefrom aerospike_helpers.expressions import GT, MapBinfrom aerospike_helpers.expressions.map import MapGetByKeyRange
exp = GT( MapGetByKeyRange(None, aerospike.MAP_RETURN_COUNT, None, "sku-z", MapBin("stock")), 0,).compile()as_exp_build(predexp, as_exp_cmp_gt( as_exp_map_get_by_key_range( NULL, AS_MAP_RETURN_COUNT, as_exp_nil(), as_exp_str("sku-z"), as_exp_bin_map("stock")), as_exp_int(0)));// Requires: import as "github.com/aerospike/aerospike-client-go/v6"_ = as.ExpGreater( as.ExpMapGetByKeyRange(as.MapReturnType.COUNT, nil, as.ExpStringVal("sku-z"), as.ExpMapBin("stock")), as.ExpIntVal(0),)Expression exp = Exp.Build( Exp.GT( MapExp.GetByKeyRange(MapReturnType.COUNT, null, Exp.Val("sku-z"), Exp.MapBin("stock")), Exp.Val(0)));const Aerospike = require('aerospike')const exp = Aerospike.expconst maps = Aerospike.maps
const filterExp = exp.gt( exp.maps.getByKeyRange(exp.binMap('stock'), exp.str('sku-z'), exp.nil(), maps.returnType.COUNT), exp.int(0),)map_get_by_rank(type, context, result_type, rank, bin)Get element at rank.
| Name | Type |
|---|---|
type | integer_value |
context | library_specific |
result_type | integer_value |
rank | integer_expr |
bin | map_bin_expr |
Filter where the lowest-ranked value equals 5.
import com.aerospike.client.cdt.MapReturnType;import com.aerospike.client.exp.Expression;import com.aerospike.client.exp.Exp;import com.aerospike.client.exp.MapExp;
Expression exp = Exp.build( Exp.eq( MapExp.getByRank(MapReturnType.VALUE, Exp.Type.INT, Exp.val(0), Exp.mapBin("stock")), Exp.val(5)));import aerospikefrom aerospike_helpers.expressions import Eq, MapBin, ResultTypefrom aerospike_helpers.expressions.map import MapGetByRank
exp = Eq( MapGetByRank(None, aerospike.MAP_RETURN_VALUE, ResultType.INTEGER, 0, MapBin("stock")), 5,).compile()as_exp_build(predexp, as_exp_cmp_eq( as_exp_map_get_by_rank( NULL, AS_MAP_RETURN_VALUE, AS_EXP_TYPE_INT, as_exp_int(0), as_exp_bin_map("stock")), as_exp_int(5)));// Requires: import as "github.com/aerospike/aerospike-client-go/v6"_ = as.ExpEq( as.ExpMapGetByRank(as.MapReturnType.VALUE, as.ExpTypeINT, as.ExpIntVal(0), as.ExpMapBin("stock")), as.ExpIntVal(5),)Expression exp = Exp.Build( Exp.EQ( MapExp.GetByRank(MapReturnType.VALUE, Exp.Type.INT, Exp.Val(0), Exp.MapBin("stock")), Exp.Val(5)));const Aerospike = require('aerospike')const exp = Aerospike.expconst maps = Aerospike.maps
const filterExp = exp.eq( exp.maps.getByRank(exp.binMap('stock'), exp.int(0), exp.type.INT, maps.returnType.VALUE), exp.int(5),)map_get_by_rank_range(context, result_type, rank, count, bin)Get count element at rank.
| Name | Type |
|---|---|
context | library_specific |
result_type | integer_value |
rank | integer_expr |
count | integer_expr |
bin | map_bin_expr |
Filter where exactly two entries are selected starting at rank 0.
import com.aerospike.client.cdt.MapReturnType;import com.aerospike.client.exp.Expression;import com.aerospike.client.exp.Exp;import com.aerospike.client.exp.MapExp;
Expression exp = Exp.build( Exp.eq( MapExp.getByRankRange(MapReturnType.COUNT, Exp.val(0), Exp.val(2), Exp.mapBin("stock")), Exp.val(2)));import aerospikefrom aerospike_helpers.expressions import Eq, MapBinfrom aerospike_helpers.expressions.map import MapGetByRankRange
exp = Eq( MapGetByRankRange(None, aerospike.MAP_RETURN_COUNT, 0, 2, MapBin("stock")), 2,).compile()as_exp_build(predexp, as_exp_cmp_eq( as_exp_map_get_by_rank_range( NULL, AS_MAP_RETURN_COUNT, as_exp_int(0), as_exp_int(2), as_exp_bin_map("stock")), as_exp_int(2)));// Requires: import as "github.com/aerospike/aerospike-client-go/v6"_ = as.ExpEq( as.ExpMapGetByRankRangeCount( as.MapReturnType.COUNT, as.ExpIntVal(0), as.ExpIntVal(2), as.ExpMapBin("stock"), ), as.ExpIntVal(2),)Expression exp = Exp.Build( Exp.EQ( MapExp.GetByRankRange(MapReturnType.COUNT, Exp.Val(0), Exp.Val(2), Exp.MapBin("stock")), Exp.Val(2)));const Aerospike = require('aerospike')const exp = Aerospike.expconst maps = Aerospike.maps
const filterExp = exp.eq( exp.maps.getByRankRange(exp.binMap('stock'), exp.int(2), exp.int(0), maps.returnType.COUNT), exp.int(2),)map_get_by_rank_range_to_end(context, result_type, rank, bin)Get all elements at and after rank.
| Name | Type |
|---|---|
context | library_specific |
result_type | integer_value |
rank | integer_expr |
bin | map_bin_expr |
Filter where the count from rank 0 to the last rank is positive.
import com.aerospike.client.cdt.MapReturnType;import com.aerospike.client.exp.Expression;import com.aerospike.client.exp.Exp;import com.aerospike.client.exp.MapExp;
Expression exp = Exp.build( Exp.gt(MapExp.getByRankRange(MapReturnType.COUNT, Exp.val(0), Exp.mapBin("stock")), Exp.val(0)));import aerospikefrom aerospike_helpers.expressions import GT, MapBinfrom aerospike_helpers.expressions.map import MapGetByRankRangeToEnd
exp = GT(MapGetByRankRangeToEnd(None, aerospike.MAP_RETURN_COUNT, 0, MapBin("stock")), 0).compile()as_exp_build(predexp, as_exp_cmp_gt( as_exp_map_get_by_rank_range_to_end( NULL, AS_MAP_RETURN_COUNT, as_exp_int(0), as_exp_bin_map("stock")), as_exp_int(0)));// Requires: import as "github.com/aerospike/aerospike-client-go/v6"_ = as.ExpGreater( as.ExpMapGetByRankRange(as.MapReturnType.COUNT, as.ExpIntVal(0), as.ExpMapBin("stock")), as.ExpIntVal(0),)Expression exp = Exp.Build( Exp.GT( MapExp.GetByRankRange(MapReturnType.COUNT, Exp.Val(0), Exp.MapBin("stock")), Exp.Val(0)));const Aerospike = require('aerospike')const exp = Aerospike.expconst maps = Aerospike.maps
const filterExp = exp.gt( exp.maps.getByRankRangeToEnd(exp.binMap('stock'), exp.int(0), maps.returnType.COUNT), exp.int(0),)map_get_by_rel_index_range(context, result_type, key, index, count_expr, bin)Get count elements at index relative to key.
| Name | Type |
|---|---|
context | library_specific |
result_type | integer_value |
key | expr |
index | integer_expr |
count_expr | integer_expr |
bin | map_bin_expr |
Filter where exactly one entry is selected starting at index 0 relative to key sku-a.
import com.aerospike.client.cdt.MapReturnType;import com.aerospike.client.exp.Expression;import com.aerospike.client.exp.Exp;import com.aerospike.client.exp.MapExp;
Expression exp = Exp.build( Exp.eq( MapExp.getByKeyRelativeIndexRange( MapReturnType.COUNT, Exp.val("sku-a"), Exp.val(0), Exp.val(1), Exp.mapBin("stock")), Exp.val(1)));import aerospikefrom aerospike_helpers.expressions import Eq, MapBinfrom aerospike_helpers.expressions.map import MapGetByKeyRelIndexRange
exp = Eq( MapGetByKeyRelIndexRange(None, aerospike.MAP_RETURN_COUNT, "sku-a", 0, 1, MapBin("stock")), 1,).compile()as_exp_build(predexp, as_exp_cmp_eq( as_exp_map_get_by_key_rel_index_range( NULL, AS_MAP_RETURN_COUNT, as_exp_str("sku-a"), as_exp_int(0), as_exp_int(1), as_exp_bin_map("stock")), as_exp_int(1)));// Requires: import as "github.com/aerospike/aerospike-client-go/v6"_ = as.ExpEq( as.ExpMapGetByKeyRelativeIndexRangeCount( as.MapReturnType.COUNT, as.ExpStringVal("sku-a"), as.ExpIntVal(0), as.ExpIntVal(1), as.ExpMapBin("stock"), ), as.ExpIntVal(1),)Expression exp = Exp.Build( Exp.EQ( MapExp.GetByKeyRelativeIndexRange(MapReturnType.COUNT, Exp.Val("sku-a"), Exp.Val(0), Exp.Val(1), Exp.MapBin("stock")), Exp.Val(1)));const Aerospike = require('aerospike')const exp = Aerospike.expconst maps = Aerospike.maps
const filterExp = exp.eq( exp.maps.getByKeyRelIndexRange( exp.binMap('stock'), exp.int(1), exp.int(0), exp.str('sku-a'), maps.returnType.COUNT, ), exp.int(1),)map_get_by_rel_index_range_to_end(context, result_type, key, index_expr, bin)Get all elements at and after index relative to key.
| Name | Type |
|---|---|
context | library_specific |
result_type | integer_value |
key | expr |
index_expr | |
bin | map_bin_expr |
Filter where the COUNT of entries from index 0 relative to key sku-a is positive.
import com.aerospike.client.cdt.MapReturnType;import com.aerospike.client.exp.Expression;import com.aerospike.client.exp.Exp;import com.aerospike.client.exp.MapExp;
Expression exp = Exp.build( Exp.gt( MapExp.getByKeyRelativeIndexRange( MapReturnType.COUNT, Exp.val("sku-a"), Exp.val(0), Exp.mapBin("stock")), Exp.val(0)));import aerospikefrom aerospike_helpers.expressions import GT, MapBinfrom aerospike_helpers.expressions.map import MapGetByKeyRelIndexRangeToEnd
exp = GT( MapGetByKeyRelIndexRangeToEnd(None, aerospike.MAP_RETURN_COUNT, "sku-a", 0, MapBin("stock")), 0,).compile()as_exp_build(predexp, as_exp_cmp_gt( as_exp_map_get_by_key_rel_index_range_to_end( NULL, AS_MAP_RETURN_COUNT, as_exp_str("sku-a"), as_exp_int(0), as_exp_bin_map("stock")), as_exp_int(0)));// Requires: import as "github.com/aerospike/aerospike-client-go/v6"_ = as.ExpGreater( as.ExpMapGetByKeyRelativeIndexRange( as.MapReturnType.COUNT, as.ExpStringVal("sku-a"), as.ExpIntVal(0), as.ExpMapBin("stock"), ), as.ExpIntVal(0),)Expression exp = Exp.Build( Exp.GT( MapExp.GetByKeyRelativeIndexRange(MapReturnType.COUNT, Exp.Val("sku-a"), Exp.Val(0), Exp.MapBin("stock")), Exp.Val(0)));const Aerospike = require('aerospike')const exp = Aerospike.expconst maps = Aerospike.maps
const filterExp = exp.gt( exp.maps.getByKeyRelIndexRangeToEnd( exp.binMap('stock'), exp.int(0), exp.str('sku-a'), maps.returnType.COUNT, ), exp.int(0),)map_get_by_rel_rank_range(context, result_type, value, rank, count, bin)Get count elements at rank relative to value.
| Name | Type |
|---|---|
context | library_specific |
result_type | integer_value |
value | expr |
rank | integer_expr |
count | integer_expr |
bin | map_bin_expr |
Filter where bounded relative-rank selection from value 5 has positive COUNT.
import com.aerospike.client.cdt.MapReturnType;import com.aerospike.client.exp.Expression;import com.aerospike.client.exp.Exp;import com.aerospike.client.exp.MapExp;
Expression exp = Exp.build( Exp.gt( MapExp.getByValueRelativeRankRange( MapReturnType.COUNT, Exp.val(5), Exp.val(0), Exp.val(2), Exp.mapBin("stock")), Exp.val(0)));import aerospikefrom aerospike_helpers.expressions import GT, MapBinfrom aerospike_helpers.expressions.map import MapGetByValueRelRankRange
exp = GT( MapGetByValueRelRankRange(None, aerospike.MAP_RETURN_COUNT, 5, 0, 2, MapBin("stock")), 0,).compile()as_exp_build(predexp, as_exp_cmp_gt( as_exp_map_get_by_value_rel_rank_range( NULL, AS_MAP_RETURN_COUNT, as_exp_int(5), as_exp_int(0), as_exp_int(2), as_exp_bin_map("stock")), as_exp_int(0)));// Requires: import as "github.com/aerospike/aerospike-client-go/v6"_ = as.ExpGreater( as.ExpMapGetByValueRelativeRankRangeCount( as.MapReturnType.COUNT, as.ExpIntVal(5), as.ExpIntVal(0), as.ExpIntVal(2), as.ExpMapBin("stock"), ), as.ExpIntVal(0),)Expression exp = Exp.Build( Exp.GT( MapExp.GetByValueRelativeRankRange( MapReturnType.COUNT, Exp.Val(5), Exp.Val(0), Exp.Val(2), Exp.MapBin("stock")), Exp.Val(0)));const Aerospike = require('aerospike')const exp = Aerospike.expconst maps = Aerospike.maps
const filterExp = exp.gt( exp.maps.getByValueRelRankRange( exp.binMap('stock'), exp.int(2), exp.int(0), exp.int(5), maps.returnType.COUNT, ), exp.int(0),)map_get_by_rel_rank_range_to_end(context, result_type, value, rank, bin)Get all elements at and after rank relative to value.
| Name | Type |
|---|---|
context | library_specific |
result_type | integer_value |
value | expr |
rank | integer_expr |
bin | map_bin_expr |
Filter where relative rank selection from value 5 has positive COUNT.
import com.aerospike.client.cdt.MapReturnType;import com.aerospike.client.exp.Expression;import com.aerospike.client.exp.Exp;import com.aerospike.client.exp.MapExp;
Expression exp = Exp.build( Exp.gt( MapExp.getByValueRelativeRankRange( MapReturnType.COUNT, Exp.val(5), Exp.val(0), Exp.mapBin("stock")), Exp.val(0)));import aerospikefrom aerospike_helpers.expressions import GT, MapBinfrom aerospike_helpers.expressions.map import MapGetByValueRelRankRangeToEnd
exp = GT( MapGetByValueRelRankRangeToEnd(None, aerospike.MAP_RETURN_COUNT, 5, 0, MapBin("stock")), 0,).compile()as_exp_build(predexp, as_exp_cmp_gt( as_exp_map_get_by_value_rel_rank_range_to_end( NULL, AS_MAP_RETURN_COUNT, as_exp_int(5), as_exp_int(0), as_exp_bin_map("stock")), as_exp_int(0)));// Requires: import as "github.com/aerospike/aerospike-client-go/v6"_ = as.ExpGreater( as.ExpMapGetByValueRelativeRankRange( as.MapReturnType.COUNT, as.ExpIntVal(5), as.ExpIntVal(0), as.ExpMapBin("stock"), ), as.ExpIntVal(0),)Expression exp = Exp.Build( Exp.GT( MapExp.GetByValueRelativeRankRange(MapReturnType.COUNT, Exp.Val(5), Exp.Val(0), Exp.MapBin("stock")), Exp.Val(0)));const Aerospike = require('aerospike')const exp = Aerospike.expconst maps = Aerospike.maps
const filterExp = exp.gt( exp.maps.getByValueRelRankRangeToEnd( exp.binMap('stock'), exp.int(0), exp.int(5), maps.returnType.COUNT, ), exp.int(0),)map_get_by_value(context, result_type, value, bin)Get all elements where value == value.
| Name | Type |
|---|---|
context | library_specific |
result_type | integer_value |
value | expr |
bin | map_bin_expr |
Filter where the count of map entries with value 12 is positive.
import com.aerospike.client.cdt.MapReturnType;import com.aerospike.client.exp.Expression;import com.aerospike.client.exp.Exp;import com.aerospike.client.exp.MapExp;
Expression exp = Exp.build( Exp.gt(MapExp.getByValue(MapReturnType.COUNT, Exp.val(12), Exp.mapBin("stock")), Exp.val(0)));import aerospikefrom aerospike_helpers.expressions import GT, MapBinfrom aerospike_helpers.expressions.map import MapGetByValue
exp = GT(MapGetByValue(None, aerospike.MAP_RETURN_COUNT, 12, MapBin("stock")), 0).compile()as_exp_build(predexp, as_exp_cmp_gt( as_exp_map_get_by_value(NULL, AS_MAP_RETURN_COUNT, as_exp_int(12), as_exp_bin_map("stock")), as_exp_int(0)));// Requires: import as "github.com/aerospike/aerospike-client-go/v6"_ = as.ExpGreater( as.ExpMapGetByValue(as.MapReturnType.COUNT, as.ExpIntVal(12), as.ExpMapBin("stock")), as.ExpIntVal(0),)Expression exp = Exp.Build( Exp.GT(MapExp.GetByValue(MapReturnType.COUNT, Exp.Val(12), Exp.MapBin("stock")), Exp.Val(0)));const Aerospike = require('aerospike')const exp = Aerospike.expconst maps = Aerospike.maps
const filterExp = exp.gt( exp.maps.getByValue(exp.binMap('stock'), exp.int(12), maps.returnType.COUNT), exp.int(0),)map_get_by_value_list(context, result_type, values, bin)Get all elements where value ∈ values.
| Name | Type |
|---|---|
context | library_specific |
result_type | integer_value |
values | list_expr |
bin | map_bin_expr |
Filter where the count of entries with values 5 and 12 is positive.
import com.aerospike.client.cdt.MapReturnType;import com.aerospike.client.exp.Expression;import com.aerospike.client.exp.Exp;import com.aerospike.client.exp.MapExp;
import java.util.Arrays;
Expression exp = Exp.build( Exp.gt( MapExp.getByValueList(MapReturnType.COUNT, Exp.val(Arrays.asList(5, 12)), Exp.mapBin("stock")), Exp.val(0)));import aerospikefrom aerospike_helpers.expressions import GT, MapBinfrom aerospike_helpers.expressions.map import MapGetByValueList
exp = GT( MapGetByValueList(None, aerospike.MAP_RETURN_COUNT, [5, 12], MapBin("stock")), 0,).compile()as_arraylist vl;as_arraylist_init(&vl, 2, 2);as_arraylist_append_int64(&vl, 5);as_arraylist_append_int64(&vl, 12);as_exp_build(predexp, as_exp_cmp_gt( as_exp_map_get_by_value_list( NULL, AS_MAP_RETURN_COUNT, as_exp_val(&vl), as_exp_bin_map("stock")), as_exp_int(0)));as_arraylist_destroy(&vl);// Requires: import as "github.com/aerospike/aerospike-client-go/v6"_ = as.ExpGreater( as.ExpMapGetByValueList( as.MapReturnType.COUNT, as.ExpListVal(as.NewValue(5), as.NewValue(12)), as.ExpMapBin("stock"), ), as.ExpIntVal(0),)using System.Collections.Generic;
Expression exp = Exp.Build( Exp.GT( MapExp.GetByValueList(MapReturnType.COUNT, Exp.Val(new List<long> { 5, 12 }), Exp.MapBin("stock")), Exp.Val(0)));const Aerospike = require('aerospike')const exp = Aerospike.expconst maps = Aerospike.maps
const filterExp = exp.gt( exp.maps.getByValueList(exp.binMap('stock'), exp.list([5, 12]), maps.returnType.COUNT), exp.int(0),)map_get_by_value_range(context, result_type, start, end, bin)Get all elements with value v in interval start ≤ v < end.
| Name | Type |
|---|---|
context | library_specific |
result_type | integer_value |
start | integer_expr |
end | integer_expr |
bin | map_bin_expr |
Filter where the count of values in [5, 50) in stock is positive.
import com.aerospike.client.cdt.MapReturnType;import com.aerospike.client.exp.Expression;import com.aerospike.client.exp.Exp;import com.aerospike.client.exp.MapExp;
Expression exp = Exp.build( Exp.gt( MapExp.getByValueRange(MapReturnType.COUNT, Exp.val(5), Exp.val(50), Exp.mapBin("stock")), Exp.val(0)));import aerospikefrom aerospike_helpers.expressions import GT, MapBinfrom aerospike_helpers.expressions.map import MapGetByValueRange
exp = GT(MapGetByValueRange(None, aerospike.MAP_RETURN_COUNT, 5, 50, MapBin("stock")), 0).compile()as_exp_build(predexp, as_exp_cmp_gt( as_exp_map_get_by_value_range( NULL, AS_MAP_RETURN_COUNT, as_exp_int(5), as_exp_int(50), as_exp_bin_map("stock")), as_exp_int(0)));// Requires: import as "github.com/aerospike/aerospike-client-go/v6"_ = as.ExpGreater( as.ExpMapGetByValueRange(as.MapReturnType.COUNT, as.ExpIntVal(5), as.ExpIntVal(50), as.ExpMapBin("stock")), as.ExpIntVal(0),)Expression exp = Exp.Build( Exp.GT( MapExp.GetByValueRange(MapReturnType.COUNT, Exp.Val(5), Exp.Val(50), Exp.MapBin("stock")), Exp.Val(0)));const Aerospike = require('aerospike')const exp = Aerospike.expconst maps = Aerospike.maps
const filterExp = exp.gt( exp.maps.getByValueRange(exp.binMap('stock'), exp.int(50), exp.int(5), maps.returnType.COUNT), exp.int(0),)map_keys(bin)Extract all keys from a map as a list. Unlike the MapExp / CDT map read operations, this is a standalone expression (Exp class) that takes no context or return_type parameter.
| Name | Type |
|---|---|
bin | map_bin_expr |
list_value Get the keys of map bin stock as a list, then check its list_size is greater than 0.
import com.aerospike.client.exp.Expression;import com.aerospike.client.exp.Exp;import com.aerospike.client.exp.ListExp;
Expression exp = Exp.build( Exp.gt( ListExp.size(Exp.mapKeysIn(Exp.mapBin("stock"))), Exp.val(0)));from aerospike_helpers.expressions import GT, MapBinfrom aerospike_helpers.expressions.map import MapGetKeysfrom aerospike_helpers.expressions.list import ListSize
exp = GT(ListSize(None, MapGetKeys(MapBin("stock"))), 0).compile()as_exp_build(predexp, as_exp_cmp_gt( as_exp_list_size(NULL, as_exp_map_keys(as_exp_bin_map("stock"))), as_exp_int(0)));// Requires: import as "github.com/aerospike/aerospike-client-go/v6"_ = as.ExpGreater( as.ExpListSize(as.ExpMapKeys(as.ExpMapBin("stock"))), as.ExpIntVal(0),)Expression exp = Exp.Build( Exp.GT( ListExp.Size(Exp.MapKeysIn(Exp.MapBin("stock"))), Exp.Val(0)));map_size(context, bin)Get number of items in the map.
| Name | Type |
|---|---|
context | library_specific |
bin | map_bin_expr |
integer_bin Filter records whose map bin stock is non-empty (same pattern as bin_map with size).
import com.aerospike.client.exp.Expression;import com.aerospike.client.exp.Exp;import com.aerospike.client.exp.MapExp;
Expression exp = Exp.build( Exp.gt(MapExp.size(Exp.mapBin("stock")), Exp.val(0)));from aerospike_helpers.expressions import GT, MapBinfrom aerospike_helpers.expressions.map import MapSize
exp = GT(MapSize(None, MapBin("stock")), 0).compile()as_exp_build(predexp, as_exp_cmp_gt( as_exp_map_size(NULL, as_exp_bin_map("stock")), as_exp_int(0)));// Requires: import as "github.com/aerospike/aerospike-client-go/v6"_ = as.ExpGreater( as.ExpMapSize(as.ExpMapBin("stock")), as.ExpIntVal(0),)Expression exp = Exp.Build( Exp.GT(MapExp.Size(Exp.MapBin("stock")), Exp.Val(0)));const Aerospike = require('aerospike')const exp = Aerospike.exp
const filterExp = exp.gt( exp.maps.size(exp.binMap('stock')), exp.int(0),)map_values(bin)Extract all values from a map as a list. Unlike the MapExp / CDT map read operations, this is a standalone expression (Exp class) that takes no context or return_type parameter.
| Name | Type |
|---|---|
bin | map_bin_expr |
list_value Get the values of map bin stock as a list, then check its list_size is greater than 0.
import com.aerospike.client.exp.Expression;import com.aerospike.client.exp.Exp;import com.aerospike.client.exp.ListExp;
Expression exp = Exp.build( Exp.gt( ListExp.size(Exp.mapValuesIn(Exp.mapBin("stock"))), Exp.val(0)));from aerospike_helpers.expressions import GT, MapBinfrom aerospike_helpers.expressions.map import MapGetValuesfrom aerospike_helpers.expressions.list import ListSize
exp = GT(ListSize(None, MapGetValues(MapBin("stock"))), 0).compile()as_exp_build(predexp, as_exp_cmp_gt( as_exp_list_size(NULL, as_exp_map_values(as_exp_bin_map("stock"))), as_exp_int(0)));// Requires: import as "github.com/aerospike/aerospike-client-go/v6"_ = as.ExpGreater( as.ExpListSize(as.ExpMapValues(as.ExpMapBin("stock"))), as.ExpIntVal(0),)Expression exp = Exp.Build( Exp.GT( ListExp.Size(Exp.MapValuesIn(Exp.MapBin("stock"))), Exp.Val(0)));