Etso v1.0.1 Etso.Adapter.TableRegistry View Source
Provides convenience function to spin up a Registry, which is used to hold the Table Servers (registered by GenServer when starting up), alongside their ETS tables (registered when the Table Server starts).
Link to this section Summary
Functions
Returns Child Specification for the Table Registry that will be associated with the repo
.
Returns the ETS table associated with the given repo
which is used to hold data for schema
.
Registers the ETS table associated with the given repo
which is used to hold data for schema
.
Link to this section Functions
child_spec(repo)
View Sourcechild_spec(Etso.repo()) :: Supervisor.child_spec()
Returns Child Specification for the Table Registry that will be associated with the repo
.
get_table(repo, schema)
View Sourceget_table(Etso.repo(), Etso.schema()) :: {:ok, Etso.table()} | {:error, term()}
Returns the ETS table associated with the given repo
which is used to hold data for schema
.
register_table(repo, schema, table_reference)
View Sourceregister_table(Etso.repo(), Etso.schema(), Etso.table()) :: :ok | {:error, term()}
Registers the ETS table associated with the given repo
which is used to hold data for schema
.