simple_repo v1.2.1 SimpleRepo.Scoped

SimpleRepo.Scoped provides a macro extending the Ecto.Repo module:

defmodule MyRepository do

use Ecto.Repo, otpapp: :myapp use SimpleRepo.Scoped, repo: __MODULE end

The following functions are available:

by_id_scoped/4 one_scoped/3, all_scoped/2, update_scoped/5, update_all_scoped/4 delete_scoped/4, delete_all_scoped/3 aggregate_scoped/5

The scope will ensure only access to conditions defined as scope given by a keyword list.

The scopes corresponds to everythng valid from SimpleRepo.Query