ActiveRecord vs Ecto

An app to compare ActiveRecord and Ecto queries side-by-side.

Get all users

ActiveRecord
User.all
Ecto
Repo.all(User)

Get a user by name

ActiveRecord
User.find_by(name: "Josh")
Ecto
Repo.get_by(User, name: "Josh")

Fetch user with id=1

ActiveRecord
User.find(1)
Ecto
Repo.get!(User, 1)