Anvil.API.State (Anvil v0.1.1)
View SourceRepo-backed persistence for the /v1 IR API.
Uses dedicated tables to store the LabelingIR structs while enforcing tenant scoping.
Summary
Functions
@spec get_dataset(String.t(), String.t() | nil) :: {:ok, LabelingIR.Dataset.t()} | :error
@spec get_sample(String.t(), String.t() | nil) :: {:ok, LabelingIR.Sample.t()} | :error
@spec get_schema(String.t(), String.t() | nil) :: {:ok, LabelingIR.Schema.t()} | :error
@spec next_assignment(String.t(), String.t(), String.t()) :: {:ok, LabelingIR.Assignment.t()} | {:error, :not_found | :no_samples}
@spec put_assignment(LabelingIR.Assignment.t()) :: :ok | {:error, term()}
@spec put_dataset(LabelingIR.Dataset.t()) :: :ok | {:error, term()}
@spec put_label(LabelingIR.Label.t()) :: {:ok, LabelingIR.Label.t()} | {:error, term()}
@spec put_sample(LabelingIR.Sample.t()) :: :ok | {:error, term()}
@spec put_schema(LabelingIR.Schema.t()) :: :ok | {:error, term()}
@spec reset!() :: :ok