Ecto Extras 


A set of helper functions for Ecto.Repo and Ecto.Query
Ecto.Repo helpers
firstfirst!lastlast!countminmaxavgsum
Setup:
defmodule YourApp.Repo do
use EctoExtras.Repo
# ...
endExample usage:
Repo.count(User)
# instead of
Repo.one(from u in User, select: count(u.id))Ecto.Query helpers
lowerupper
Example usage:
import EctoExtras.Query
Repo.one(from u in User, where: lower(u.email) == "email@example.com")
# instead of
Repo.one(from u in User, where: fragment("lower(?)", u.email) == "email@example.com")