EctoCrux v1.1.0 EctoCrux

Crud concern to use in helper's schema implementation with common Repo methods. Replace methods generated with mix phx.gen.schema.

Getting started

Installation

def deps do
  [
    {:ecto_crux, "~> 1.1.0"}
  ]
end

configuration

config :ecto_crux, repo: MyApp.Repo

usage example

From a schema module MyApp.Schema.Baguette, create a MyApp.Schema.Baguettes module containing:

defmodule MyApp.Schema.Baguettes do
  use EctoCrux, module: MyApp.Schema.Baguette

  # This module is also the perfect place to implement all your custom accessors/operations arround this schema.
  # This allows you to have all your query/repo code centralized in one file, keeping your code-base clean.
end

You are good to go !

Functions you can now uses with MyApp.Schema.Baguettes are available here