Ecto Extras CI

A set of helper functions for Ecto.Repo and Ecto.Query

Ecto.Repo helpers

first first! last last! count min max avg sum


defmodule YourApp.Repo do
  use EctoExtras.Repo
  # ...

Example usage:


# instead of u in User, select: count(

Ecto.Query helpers

lower upper

Example usage:

import EctoExtras.Query u in User, where: lower( == "")

# instead of u in User, where: fragment("lower(?)", == "")