Ferricstore.Flow.OrderedIndex (ferricstore v0.11.1)

Copy Markdown View Source

Paired-registry facade for the native Flow ordered index.

All data lives in Ferricstore.Flow.NativeOrderedIndex; the paired identifiers let callers resolve the same native resource from either side.

Summary

Types

score_input()

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

table_ref()

@type table_ref() :: Ferricstore.Flow.NativeOrderedIndex.index_name()

Functions

count_all(lookup_table, key)

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

count_keys_page(lookup_table, cursor, limit)

@spec count_keys_page(table_ref(), binary() | nil, pos_integer()) :: [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_page(lookup_table, cursor, limit)

@spec due_count_keys_page(table_ref(), binary() | nil, pos_integer()) :: [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()}
]

reduce_due_count_key_pages(lookup_table, acc, reducer)

@spec reduce_due_count_key_pages(
  table_ref(),
  term(),
  ([binary()], term() -> {:cont, term()} | {:halt, term()})
) :: term()

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()) :: {table_ref(), table_ref()}