View Source Vettore.Store behaviour (Vettore v0.3.1)
Storage behaviour for Vettore collections.
Stores own records and metadata. Indexes and native accelerators are separate from this layer so ETS can remain the canonical source of collection state.
Link to this section Summary
Link to this section Types
Link to this section Callbacks
@callback all(state()) :: {:ok, [Vettore.Embedding.t()]} | {:error, term()}
@callback count(state()) :: non_neg_integer()
@callback fold(state(), acc, (Vettore.Embedding.t(), acc -> acc)) :: {:ok, acc} when acc: term()
@callback get(state(), id()) :: {:ok, Vettore.Embedding.t()} | {:error, term()}
@callback put(state(), Vettore.Embedding.t()) :: :ok | {:error, term()}
@callback put_many(state(), [Vettore.Embedding.t()]) :: :ok | {:error, term()}