ecto_mnesia v0.8.0 Ecto.Adapters.Mnesia
Ecto 2.X adapter for Mnesia Erlang term database.
Run-Time Storage Options
:host
- Node hostname.:dir
- Path where Mnesia should store DB data.:storage_type
- Type of Mnesia storage.
Mnesia Storage Types
:disc_copies
- store data in both RAM and on dics. Recommended value for most cases.:ram_copies
- store data only in RAM. Data will be lost on node restart. Useful when working with large datasets that don’t need to be persisted.:disc_only_copies
- store data only on dics. This will limit database size to 2GB and affect adapter performance.
Limitations
There are some limitations when using Ecto with MySQL that one needs to be aware of.
Transactions
Right now all transactions will be run in dirty context.
UUIDs
Mnesia does not support UUID types. Ecto emulates them by using binary(16)
.
DDL Transaction
Mnesia migrations are DDL’s by their nature, so Ecto does not have control over it and behavior may be different from other adapters.
Types
Mnesia doesn’t care about types, so all data will be stored as-is.