ash_postgres v0.7.0 AshPostgres.DataLayer View Source

A postgres data layer that levereges Ecto's postgres capabilities.

To use this data layer, you need to define an Ecto.Repo. Ash adds some functionality on top of ecto repos, so you'll want to use AshPostgres.Repo

Then, configure your resource like so:

postgres do
  repo MyApp.Repo
  table "table_name"
end

Link to this section Summary

Functions

Postgres data layer configuration

Link to this section Functions

Link to this macro

postgres(body)

View Source (macro)

Postgres data layer configuration

Options

  • :repo - Required. The repo that will be used to fetch your data. See the Ecto.Repo documentation for more

  • :table - Required. The table to store and read the resource from