guaxinim v0.1.2 Guaxinim.Database

Link to this section Summary

Functions

Alias all the table names in the current scope and require what’s needed

Create the database, it calls .create on every defined table

Create the database, it calls .create on every defined table, raises in case of error

Destroy the database, it calls .destroy on every defined table

Destroy the database, it calls .destroy on every defined table, raises in case of error

List of atoms of the defined tables in the database

Wait for the database to be loaded

Link to this section Functions

Link to this macro __using__(opts) (macro)

Alias all the table names in the current scope and require what’s needed.

Link to this function create(copying \\ [])
create(Amnesia.Table.c()) :: [Amnesia.Table.o()]

Create the database, it calls .create on every defined table.

Link to this function create!(copying \\ [])
create!(Amnesia.Table.c()) :: [Amnesia.Table.o()]

Create the database, it calls .create on every defined table, raises in case of error.

Link to this function destroy()
destroy() :: [Amnesia.Table.o()]

Destroy the database, it calls .destroy on every defined table.

Link to this function destroy!()
destroy!() :: [Amnesia.Table.o()]

Destroy the database, it calls .destroy on every defined table, raises in case of error.

Link to this function metadata()
metadata() :: Amnesia.Metadata.t()
Link to this function tables()
tables() :: [atom()]

List of atoms of the defined tables in the database.

Link to this function wait(timeout \\ :infinity)
wait(integer() | :infinity) ::
  :ok |
  {:timeout, [atom()]} |
  {:error, atom()}

Wait for the database to be loaded.