View Source MnesiaAssistant.Schema (Mishka developer tools v0.1.7)
This module not only provides a number of tools to better cover a real project, but it also organises functions linked to Schema in a single location.
Summary
Functions
In Mnesia, the concept of checkpoints
as it might be understood in other
database systems (specific points in time to which you can revert the database state)
is not directly exposed through a simple API call like :mnesia.activate_checkpoint
.
Mnesia's model for data recovery, consistency, and fault tolerance is built
around its transactional model, replication, and backup
/restore
functionalities.
Using the mnesia
configuration, this straightforward method will assist
you in determining whether or not the path that you have supplied is present.
When it does not already exist, it develops it.
You will need to establish a schema
in order to begin utilising Mnesia
in a project; this function will automatically create the schema for you.
For deactivating activate_checkpoint/1
.
In the same way that you are able to generate a schema for a particular node, you are also able to delete it from your project.
By means of this function, you can see information about Schema
.
It should be noted that this function is the same as the
MnesiaAssistant.Information.info/1
function with the :schema
input.
Functions
In Mnesia, the concept of checkpoints
as it might be understood in other
database systems (specific points in time to which you can revert the database state)
is not directly exposed through a simple API call like :mnesia.activate_checkpoint
.
Mnesia's model for data recovery, consistency, and fault tolerance is built
around its transactional model, replication, and backup
/restore
functionalities.
{name, Name}
| {max, [table()]}
| {min, [table()]}
| {allow_remote, boolean()}
| {ram_overrides_dump, boolean()}
Example:
MnesiaAssistant.Schema.activate_checkpoint(args)
Using the mnesia
configuration, this straightforward method will assist
you in determining whether or not the path that you have supplied is present.
When it does not already exist, it develops it.
Example:
MnesiaAssistant.Schema.create_dir()
You will need to establish a schema
in order to begin utilising Mnesia
in a project; this function will automatically create the schema for you.
Note that prior to the creation of the schema, it is necessary to determine whether or not the storage path that was introduced by the configuration already exists. Assuming that it does not already exist, this path ought to be made. see more information
create_dir()/0
Example:
MnesiaAssistant.Schema.create_schema([node()])
For deactivating activate_checkpoint/1
.
Example:
MnesiaAssistant.Schema.deactivate_checkpoint(name)
In the same way that you are able to generate a schema for a particular node, you are also able to delete it from your project.
Example:
MnesiaAssistant.Schema.delete_schema([node()])
By means of this function, you can see information about Schema
.
It should be noted that this function is the same as the
MnesiaAssistant.Information.info/1
function with the :schema
input.
Example:
MnesiaAssistant.Schema.schema()
# OR
MnesiaAssistant.Schema.schema(table)