ecto_mnesia v0.9.1 EctoMnesia.Storage

This module provides interface to manage Mnesia state and records data structure.

Link to this section Summary

Functions

Checks that the Application environment for mnesia_dir is of a correct type

Start the Mnesia database

Stop the Mnesia database

Temporarily stops Mnesia, deletes schema and then brings it back up again

Creates the storage given by options

Link to this section Functions

Link to this function check_mnesia_dir()

Checks that the Application environment for mnesia_dir is of a correct type.

Link to this function conf(config \\ [])

Start the Mnesia database.

Stop the Mnesia database.

Link to this function storage_down(config)

Temporarily stops Mnesia, deletes schema and then brings it back up again.

Link to this function storage_up(config)

Creates the storage given by options.

Returns :ok if it was created successfully. Returns {:error, :already_up} if the storage has already been created or {:error, term} in case anything else goes wrong.

Supported copy_type values: :disc_copies, :ram_copies, :disc_only_copies.

Examples

storage_up(host: `Kernel.node`, storage_type: :disc_copies)