Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I don't see "database" mentioned anywhere on that page. What direction are you going to head in with that?


We don't ship with any DB layer today, but Ecto is the defacto choice for sql. We are planning to include a Resource Protocol, so it should be very easy to bring your own DB/model layer and still get all the nice conventional route builders, forms, etc.


Ecto and PostgreSQL seems the most mature option, though there's a Redis library and of course Mnesia. I haven't been able to find any support for MySQL.


Someone was trying to add MySQL support - https://github.com/elixir-lang/ecto/pull/193

It is possible to write an Ecto adapter for Riak, with some workarounds. I tried it once, but the motivation to continue...


As others have said, Ecto is the layer you would use to connect to Postgresql. It's pretty different from ActiveRecord, not necessarily in good or bad ways. It's just different.

Rather than try to give examples, take a look at their Github page: https://github.com/elixir-lang/ecto


I used Ecto in Phoenix to connect to PostgreSQL. I didn't try it to connect to anything else but I understand that it should work with most DBs.


It will be a long time before you will actually need something other than Mnesia :)


You can use whatever database `app` you want, such as Ecto.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: