gim v1.2.2 Gim.Repo.Table behaviour View Source

Defines a typed table of nodes.

A repository holds each distinct node type in a typed Table.

Link to this section Summary

Link to this section Callbacks

Link to this callback

delete(table, struct)

View Source
delete(table :: map(), struct()) :: :ok
Link to this callback

insert(table, struct)

View Source
insert(table :: map(), struct()) :: struct()
Link to this callback

new(reference, type)

View Source
new(reference :: atom(), type :: atom()) :: map()
Link to this callback

query(table, ids, filter)

View Source
query(table :: map(), ids :: nil | [pos_integer()], filter :: list()) ::
  {:ok, [struct()]} | {:error, Gim.NoIndexError}
Link to this callback

update(table, struct)

View Source
update(table :: map(), struct()) :: struct()