Ferricstore.Flow.OrderedIndex (ferricstore v0.4.0)

Copy Markdown View Source

Compatibility facade for the Flow ordered index.

Flow no longer keeps an ETS mirror for secondary indexes. This module keeps the older call shape alive for tests and any internal callers that have not been renamed yet, but all data lives in Ferricstore.Flow.NativeOrderedIndex.

Summary

Types

score_input()

@type score_input() :: Ferricstore.Flow.NativeOrderedIndex.score_input()

table_ref()

@type table_ref() :: atom() | reference()

Functions

count_all(lookup_table, key)

@spec count_all(table_ref(), binary()) :: non_neg_integer()

count_keys(lookup_table)

@spec count_keys(table_ref()) :: [binary()]

delete_count(lookup_table, key)

@spec delete_count(table_ref(), binary()) :: :ok

delete_member(index_table, lookup_table, key, member)

@spec delete_member(table_ref(), table_ref(), binary(), binary()) :: :ok

delete_members(index_table, lookup_table, key, members)

@spec delete_members(table_ref(), table_ref(), binary(), [binary()]) :: :ok

due_count_keys(lookup_table)

@spec due_count_keys(table_ref()) :: [binary()]

move_entries(index_table, lookup_table, key_key_member_score_quads)

@spec move_entries(table_ref(), table_ref(), [
  {binary(), binary(), binary(), score_input()}
]) :: :ok

put_entries(index_table, lookup_table, key_member_score_triples)

@spec put_entries(table_ref(), table_ref(), [{binary(), binary(), score_input()}]) ::
  :ok

put_member(index_table, lookup_table, key, member, score_input)

@spec put_member(table_ref(), table_ref(), binary(), binary(), score_input()) :: :ok

put_members(index_table, lookup_table, key, member_score_pairs)

@spec put_members(table_ref(), table_ref(), binary(), [{binary(), score_input()}]) ::
  :ok

put_new_entries(index_table, lookup_table, key_member_score_triples)

@spec put_new_entries(table_ref(), table_ref(), [{binary(), binary(), score_input()}]) ::
  :ok

put_new_member(index_table, lookup_table, key, member, score_input)

@spec put_new_member(table_ref(), table_ref(), binary(), binary(), score_input()) ::
  :ok

put_new_members(index_table, lookup_table, key, member_score_pairs)

@spec put_new_members(table_ref(), table_ref(), binary(), [{binary(), score_input()}]) ::
  :ok

range_slice(index_table, key, min_bound, max_bound, reverse?, offset, count)

@spec range_slice(
  table_ref(),
  binary(),
  term(),
  term(),
  boolean(),
  non_neg_integer(),
  non_neg_integer() | :all
) :: [{binary(), float()}]

rank_range(index_table, key, start_idx, stop_idx, reverse?)

@spec rank_range(
  table_ref(),
  binary(),
  non_neg_integer(),
  non_neg_integer(),
  boolean()
) :: [
  {binary(), float()}
]

restore_count(lookup_table, key, count)

@spec restore_count(table_ref(), binary(), integer()) :: :ok

score_of(lookup_table, key, member)

@spec score_of(table_ref(), binary(), binary()) :: {:ok, float()} | :miss

table_names(instance_name, shard_index)

@spec table_names(atom(), non_neg_integer()) :: {atom(), atom()}