CPub.DB (CPub v0.3.0) View Source
Helpers to access Database.
Also implements a Task that is used to initialize tables.
Link to this section Summary
Functions
Abort transaction with reason
.
Returns a specification to start this module under a supervisor.
The nodes where data is persisted.
Reset the entire database.
Run a database transaction.
Write a record to a table.
Link to this section Functions
Specs
Abort transaction with reason
.
Returns a specification to start this module under a supervisor.
arg
is passed as the argument to Task.start_link/1
in the :start
field
of the spec.
For more information, see the Supervisor
module,
the Supervisor.child_spec/2
function and the Supervisor.child_spec/0
type.
Specs
nodes() :: [node()]
The nodes where data is persisted.
Specs
reset() :: :ok | no_return()
Reset the entire database.
WARNING: Use with extreme caution as this will drop all data!
Specs
Specs
start_link(keyword()) :: GenServer.on_start()
Specs
Run a database transaction.
If called from within transaction the transaction will be reused.
Specs
write(Memento.Table.record(), Memento.Query.options()) :: Memento.Table.record() | no_return()
Write a record to a table.