ex_sieve v0.2.0 ExSieve

ExSieve is a object query translator to Ecto.Query.

Summary

Macros

ExSieve is meant to be used by a Ecto.Repo

Types

result :: Ecto.Query.t | {:error, error}

Functions

filter(queryable, params, config)

Specs

filter(Ecto.Queryable.t, %{optional(binary) => term}, ExSieve.Config.t) :: result

Macros

__using__(opts)

ExSieve is meant to be used by a Ecto.Repo.

When used, an optional default for ignore_erros can be provided. If ignore_erros is not provided, a default of true will be used.

defmodule MyApp.Repo do
  use Ecto.Repo, otp_app: :my_app
  use ExSieve
end

defmodule MyApp.Repo do
  use Ecto.Repo, otp_app: :my_app
  use ExSieve, ignore_erros: true
end

When use is called, a filter function is defined in the Repo.