stored v0.0.5 Stored.Backend behaviour

Link to this section Summary

Link to this section Types

Link to this type

key()

key() :: term()
Link to this type

record()

record() :: struct()
Link to this type

table_name()

table_name() :: atom()

Link to this section Callbacks

Link to this callback

all(table_name)

all(table_name()) :: [record()]
Link to this callback

clear(table_name)

clear(table_name()) :: :ok
Link to this callback

create(table_name)

create(table_name()) :: :ok
Link to this callback

find(key, table_name)

find(key(), table_name()) :: {:ok, record()} | {:error, :not_found}
Link to this callback

put(struct, table_name)

put(struct(), table_name()) :: {:ok, {key(), record()}}