Top "Ecto" questions

Ecto is a domain specific language for writing queries and interacting with databases in Elixir.

Turn postgres date representation into ISO 8601 string

I'm trying to format a Postgres date representation into a ISO 8601 string. I'm assuming that there is a Postgres function …

postgresql date elixir iso8601 ecto
How to use raw sql with ecto Repo

I have an upsert requirement, so I need to call a postgres stored procedure or use a common table expression. …

elixir ecto
Is there a Phoenix equivalent to Rails Console

I'm just learning Phoenix and Elixir and I'm coming from Ruby/Rails where I work in the REPL using pry …

elixir phoenix-framework ecto iex
How to store array with Ecto using Postgres

I would like to store an array of floating point values with Ecto using Postgres. I'm using Ecto with the …

postgresql phoenix-framework ecto
How to build WHERE IN array clause with Ecto?

How to find posts in given List of ids? This isn't working: posts = Post |> where(id: [1, 2]) |> Repo.all …

elixir phoenix-framework ecto
Elixir map check if not empty and key exists

I am trying to figure out a way to check if the params hash in a Phoenix app (using Elixir) …

elixir phoenix-framework ecto
Creating a unique constraint on two columns together in Ecto

How do you create a unique index on two columns in Ecto, which would correspond to this: CREATE TABLE someTable ( …

elixir ecto
How to rollback, reset, or drop Ecto test database?

Usually mix.test cleans the test database, but it is not working. It may be because I was playing around …

testing elixir phoenix-framework ecto
Making a field unique in ecto

How to make a field unique in ecto? I thought it's the same as the active record in Ruby, but …

elixir ecto
Why does Phoenix (ecto/Postgresx) fail to Connect in dev

I am beginning my Elixir/Phoenix journey and having some trouble with my postgres connection. When I start up my …

elixir phoenix-framework ecto boxen