ex_sieve v0.6.0 ExSieve

ExSieve is a object query translator to Ecto.Query.

Summary

Functions

ExSieve is meant to be used by a Ecto.Repo

Types

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

Functions

__using__(opts) (macro)

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.

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