Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate more :mnesia calls into the adapter #41

Open
kexoth opened this issue Jun 14, 2017 · 2 comments
Open

Migrate more :mnesia calls into the adapter #41

kexoth opened this issue Jun 14, 2017 · 2 comments

Comments

@kexoth
Copy link

kexoth commented Jun 14, 2017

Hey,

I migrated from Amnesia into ecto_mnesia because I felt that it's more convenient for a Phoenix project.

So far as I looked at the code all the queries are based on matchers. Since mnesia has some of it's own mechanisms for some calls like :mnesia.read, :mnesia.index_read, etc.

At the moment I use those calls from the native Erlang module instead of Repo.get & Repo.get_by.

What's Your opinion on the matter?

I'm eager to contribute on this part if you can point me in the right direction, feel free to contact me.
Thanks!

@AndrewDryga
Copy link
Member

Hello,

Actually, this adapter never tried to provide full Mnesia functionality (like Amnesia does). Instead, it's aim is to become drop-in replacement for small hobby projects where deploying separate DB is "too much" or tasks where your lookup time should be relatively small.

If there are some things that can be improved in current implementation - having PR would be great. But I guess it won't be easy to utilize functions other than matching because adapter itself always is receiving Ecto.Query, rather than raw Repo.get arguments. (You can improve planner to make better decisions on these cases.)

@Qqwy
Copy link
Contributor

Qqwy commented Jun 14, 2018

Actually, this adapter never tried to provide full Mnesia functionality (like Amnesia does). Instead, it's aim is to become drop-in replacement for small hobby projects where deploying separate DB is "too much" or tasks where your lookup time should be relatively small.

I think this could be mentioned more clearly in the README.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants