Aerospike.Exp.Map (Aerospike Driver v0.3.1)

Copy Markdown View Source

Map CDT expression helpers.

Summary

Types

Common map expression options.

Map expression write policy accepted in opts[:policy].

Map selector return type.

t()

Opaque server-side expression.

Functions

Removes all entries from the map expression.

Returns the entry at index, selected by return_type:.

Returns count entries from index, selected by return_type:.

Returns entries from index through the end, selected by return_type:.

Returns the entry for key, selected by return_type:.

Returns entries matching any key in keys, selected by return_type:.

Returns entries with keys in [begin_key, end_key), selected by return_type:.

Returns entries nearest to key and greater by relative index.

Returns count entries nearest to key and greater by relative index.

Returns the entry at rank, selected by return_type:.

Returns count entries from rank, selected by return_type:.

Returns entries from rank through the highest rank, selected by return_type:.

Returns entries equal to value, selected by return_type:.

Returns entries matching any value in values, selected by return_type:.

Returns entries with values in [begin_value, end_value), selected by return_type:.

Returns entries nearest to value and greater by relative rank.

Returns count entries nearest to value and greater by relative rank.

Increments the numeric value at key and returns the final value. Supports policy:.

Writes one key/value pair and returns the map size. Supports policy:.

Writes map expression values and returns the map size. Supports policy:.

Removes the entry at index, returning data selected by return_type:.

Removes count entries from index, returning selected data.

Removes entries from index through the end, returning selected data.

Removes the entry for key, returning data selected by return_type:.

Removes entries matching any key in keys, returning selected data.

Removes entries with keys in [begin_key, end_key), returning selected data.

Removes entries nearest to key and greater by relative index.

Removes count entries nearest to key and greater by relative index.

Removes the entry at rank, returning data selected by return_type:.

Removes count entries from rank, returning selected data.

Removes entries from rank through the highest rank, returning selected data.

Removes entries equal to value, returning data selected by return_type:.

Removes entries matching any value in values, returning selected data.

Removes entries with values in [begin_value, end_value), returning selected data.

Removes entries nearest to value and greater by relative rank.

Removes count entries nearest to value and greater by relative rank.

Return the selected item count.

Return whether matching entries exist.

Return selected item indexes.

Invert the selector so it applies outside the matched range.

Return selected keys.

Return selected key/value pairs.

Return no result for a selector expression.

Return selected entries as an ordered map.

Return selected value ranks.

Return selected reverse indexes, counted from the map end.

Return selected reverse ranks, counted from the highest value.

Return selected entries as an unordered map.

Return selected values.

Returns the number of entries in the map expression.

Types

opts()

@type opts() :: [policy: policy(), return_type: return_type()]

Common map expression options.

Supported keys:

  • :policy - map write policy for put/increment expressions.
  • :return_type - selector return type from the return_* helpers.

policy()

@type policy() :: Aerospike.Op.Map.policy()

Map expression write policy accepted in opts[:policy].

return_type()

@type return_type() :: Aerospike.Op.Map.return_type()

Map selector return type.

t()

@type t() :: Aerospike.Exp.t()

Opaque server-side expression.

Functions

clear(bin)

@spec clear(Aerospike.Exp.t()) :: t()

Removes all entries from the map expression.

get_by_index(bin, index, value_type, opts \\ [])

@spec get_by_index(
  Aerospike.Exp.t(),
  Aerospike.Exp.t(),
  Aerospike.Exp.exp_type(),
  opts()
) :: t()

Returns the entry at index, selected by return_type:.

get_by_index_range(bin, index, count, opts \\ [])

@spec get_by_index_range(
  Aerospike.Exp.t(),
  Aerospike.Exp.t(),
  Aerospike.Exp.t(),
  opts()
) :: t()

Returns count entries from index, selected by return_type:.

get_by_index_range_from(bin, index, opts \\ [])

@spec get_by_index_range_from(Aerospike.Exp.t(), Aerospike.Exp.t(), opts()) :: t()

Returns entries from index through the end, selected by return_type:.

get_by_key(bin, key, value_type, opts \\ [])

@spec get_by_key(
  Aerospike.Exp.t(),
  Aerospike.Exp.t(),
  Aerospike.Exp.exp_type(),
  opts()
) :: t()

Returns the entry for key, selected by return_type:.

get_by_key_list(bin, keys, opts \\ [])

@spec get_by_key_list(Aerospike.Exp.t(), Aerospike.Exp.t(), opts()) :: t()

Returns entries matching any key in keys, selected by return_type:.

get_by_key_range(bin, begin_key, end_key, opts \\ [])

@spec get_by_key_range(
  Aerospike.Exp.t(),
  Aerospike.Exp.t() | nil,
  Aerospike.Exp.t() | nil,
  opts()
) ::
  t()

Returns entries with keys in [begin_key, end_key), selected by return_type:.

get_by_key_rel_index_range(bin, key, index, opts \\ [])

@spec get_by_key_rel_index_range(
  Aerospike.Exp.t(),
  Aerospike.Exp.t(),
  Aerospike.Exp.t(),
  opts()
) :: t()

Returns entries nearest to key and greater by relative index.

get_by_key_rel_index_range_count(bin, key, index, count, opts \\ [])

@spec get_by_key_rel_index_range_count(
  Aerospike.Exp.t(),
  Aerospike.Exp.t(),
  Aerospike.Exp.t(),
  Aerospike.Exp.t(),
  opts()
) :: t()

Returns count entries nearest to key and greater by relative index.

get_by_rank(bin, rank, value_type, opts \\ [])

@spec get_by_rank(
  Aerospike.Exp.t(),
  Aerospike.Exp.t(),
  Aerospike.Exp.exp_type(),
  opts()
) :: t()

Returns the entry at rank, selected by return_type:.

get_by_rank_range(bin, rank, count, opts \\ [])

@spec get_by_rank_range(
  Aerospike.Exp.t(),
  Aerospike.Exp.t(),
  Aerospike.Exp.t(),
  opts()
) :: t()

Returns count entries from rank, selected by return_type:.

get_by_rank_range_from(bin, rank, opts \\ [])

@spec get_by_rank_range_from(Aerospike.Exp.t(), Aerospike.Exp.t(), opts()) :: t()

Returns entries from rank through the highest rank, selected by return_type:.

get_by_value(bin, value, opts \\ [])

@spec get_by_value(Aerospike.Exp.t(), Aerospike.Exp.t(), opts()) :: t()

Returns entries equal to value, selected by return_type:.

get_by_value_list(bin, values, opts \\ [])

@spec get_by_value_list(Aerospike.Exp.t(), Aerospike.Exp.t(), opts()) :: t()

Returns entries matching any value in values, selected by return_type:.

get_by_value_range(bin, begin_value, end_value, opts \\ [])

@spec get_by_value_range(
  Aerospike.Exp.t(),
  Aerospike.Exp.t() | nil,
  Aerospike.Exp.t() | nil,
  opts()
) ::
  t()

Returns entries with values in [begin_value, end_value), selected by return_type:.

get_by_value_rel_rank_range(bin, value, rank, opts \\ [])

@spec get_by_value_rel_rank_range(
  Aerospike.Exp.t(),
  Aerospike.Exp.t(),
  Aerospike.Exp.t(),
  opts()
) ::
  t()

Returns entries nearest to value and greater by relative rank.

get_by_value_rel_rank_range_count(bin, value, rank, count, opts \\ [])

@spec get_by_value_rel_rank_range_count(
  Aerospike.Exp.t(),
  Aerospike.Exp.t(),
  Aerospike.Exp.t(),
  Aerospike.Exp.t(),
  opts()
) :: t()

Returns count entries nearest to value and greater by relative rank.

increment(bin, key, delta, opts \\ [])

@spec increment(Aerospike.Exp.t(), Aerospike.Exp.t(), Aerospike.Exp.t(), opts()) ::
  t()

Increments the numeric value at key and returns the final value. Supports policy:.

put(bin, key, value, opts \\ [])

Writes one key/value pair and returns the map size. Supports policy:.

put_items(bin, values, opts \\ [])

@spec put_items(Aerospike.Exp.t(), Aerospike.Exp.t(), opts()) :: t()

Writes map expression values and returns the map size. Supports policy:.

remove_by_index(bin, index, opts \\ [])

@spec remove_by_index(Aerospike.Exp.t(), Aerospike.Exp.t(), opts()) :: t()

Removes the entry at index, returning data selected by return_type:.

remove_by_index_range(bin, index, count, opts \\ [])

@spec remove_by_index_range(
  Aerospike.Exp.t(),
  Aerospike.Exp.t(),
  Aerospike.Exp.t(),
  opts()
) :: t()

Removes count entries from index, returning selected data.

remove_by_index_range_from(bin, index, opts \\ [])

@spec remove_by_index_range_from(Aerospike.Exp.t(), Aerospike.Exp.t(), opts()) :: t()

Removes entries from index through the end, returning selected data.

remove_by_key(bin, key, opts \\ [])

@spec remove_by_key(Aerospike.Exp.t(), Aerospike.Exp.t(), opts()) :: t()

Removes the entry for key, returning data selected by return_type:.

remove_by_key_list(bin, keys, opts \\ [])

@spec remove_by_key_list(Aerospike.Exp.t(), Aerospike.Exp.t(), opts()) :: t()

Removes entries matching any key in keys, returning selected data.

remove_by_key_range(bin, begin_key, end_key, opts \\ [])

@spec remove_by_key_range(
  Aerospike.Exp.t(),
  Aerospike.Exp.t() | nil,
  Aerospike.Exp.t() | nil,
  opts()
) ::
  t()

Removes entries with keys in [begin_key, end_key), returning selected data.

remove_by_key_rel_index_range(bin, key, index, opts \\ [])

@spec remove_by_key_rel_index_range(
  Aerospike.Exp.t(),
  Aerospike.Exp.t(),
  Aerospike.Exp.t(),
  opts()
) ::
  t()

Removes entries nearest to key and greater by relative index.

remove_by_key_rel_index_range_count(bin, key, index, count, opts \\ [])

@spec remove_by_key_rel_index_range_count(
  Aerospike.Exp.t(),
  Aerospike.Exp.t(),
  Aerospike.Exp.t(),
  Aerospike.Exp.t(),
  opts()
) :: t()

Removes count entries nearest to key and greater by relative index.

remove_by_rank(bin, rank, opts \\ [])

@spec remove_by_rank(Aerospike.Exp.t(), Aerospike.Exp.t(), opts()) :: t()

Removes the entry at rank, returning data selected by return_type:.

remove_by_rank_range(bin, rank, count, opts \\ [])

@spec remove_by_rank_range(
  Aerospike.Exp.t(),
  Aerospike.Exp.t(),
  Aerospike.Exp.t(),
  opts()
) :: t()

Removes count entries from rank, returning selected data.

remove_by_rank_range_from(bin, rank, opts \\ [])

@spec remove_by_rank_range_from(Aerospike.Exp.t(), Aerospike.Exp.t(), opts()) :: t()

Removes entries from rank through the highest rank, returning selected data.

remove_by_value(bin, value, opts \\ [])

@spec remove_by_value(Aerospike.Exp.t(), Aerospike.Exp.t(), opts()) :: t()

Removes entries equal to value, returning data selected by return_type:.

remove_by_value_list(bin, values, opts \\ [])

@spec remove_by_value_list(Aerospike.Exp.t(), Aerospike.Exp.t(), opts()) :: t()

Removes entries matching any value in values, returning selected data.

remove_by_value_range(bin, begin_value, end_value, opts \\ [])

@spec remove_by_value_range(
  Aerospike.Exp.t(),
  Aerospike.Exp.t() | nil,
  Aerospike.Exp.t() | nil,
  opts()
) ::
  t()

Removes entries with values in [begin_value, end_value), returning selected data.

remove_by_value_rel_rank_range(bin, value, rank, opts \\ [])

@spec remove_by_value_rel_rank_range(
  Aerospike.Exp.t(),
  Aerospike.Exp.t(),
  Aerospike.Exp.t(),
  opts()
) ::
  t()

Removes entries nearest to value and greater by relative rank.

remove_by_value_rel_rank_range_count(bin, value, rank, count, opts \\ [])

@spec remove_by_value_rel_rank_range_count(
  Aerospike.Exp.t(),
  Aerospike.Exp.t(),
  Aerospike.Exp.t(),
  Aerospike.Exp.t(),
  opts()
) :: t()

Removes count entries nearest to value and greater by relative rank.

return_count()

@spec return_count() :: 5

Return the selected item count.

return_exists()

@spec return_exists() :: 13

Return whether matching entries exist.

return_index()

@spec return_index() :: 1

Return selected item indexes.

return_inverted()

@spec return_inverted() :: 65536

Invert the selector so it applies outside the matched range.

return_key()

@spec return_key() :: 6

Return selected keys.

return_key_value()

@spec return_key_value() :: 8

Return selected key/value pairs.

return_none()

@spec return_none() :: 0

Return no result for a selector expression.

return_ordered_map()

@spec return_ordered_map() :: 17

Return selected entries as an ordered map.

return_rank()

@spec return_rank() :: 3

Return selected value ranks.

return_reverse_index()

@spec return_reverse_index() :: 2

Return selected reverse indexes, counted from the map end.

return_reverse_rank()

@spec return_reverse_rank() :: 4

Return selected reverse ranks, counted from the highest value.

return_unordered_map()

@spec return_unordered_map() :: 16

Return selected entries as an unordered map.

return_value()

@spec return_value() :: 7

Return selected values.

size(bin)

@spec size(Aerospike.Exp.t()) :: t()

Returns the number of entries in the map expression.