EctoGen (ecto_gen v0.8.1) View Source
This tool is for Postgres
database. It is designed for database-first approach. When executed, it generates DbContext
module with configured module prefix with elixir functions that call db stored procedures.
The generated code even contains parsing mechanism that generates struct
s for each "complex" type returned from db functions. It even supports procedures (with no return type), functions returning simple types (int, text etc.).
Generated code has no runtime overhead - the code purely uses Ecto
repo.
The tool uses EEx so it is also quite customizable. You are able to select just the functions you need from given schemas or you can include all and exclude just some.