A postgresql datalayer for the Ash Framework
Find a file
2021-03-02 12:49:27 -05:00
.github fix: better embedded filters, switch to latest ash 2021-02-24 13:59:49 -05:00
config fix: better embedded filters, switch to latest ash 2021-02-24 13:59:49 -05:00
documentation chore: fix function reference 2021-02-05 19:04:21 -05:00
lib fix: don't start the whole app in migrate 2021-03-02 12:47:13 -05:00
logos
priv fix: better embedded filters, switch to latest ash 2021-02-24 13:59:49 -05:00
test fix: typo in references for multitenancy 2021-03-02 11:38:12 -05:00
test_snapshot_path feat: automatically install extensions from repo 2021-03-02 12:33:24 -05:00
.check.exs
.credo.exs feat: multitenancy (#25) 2020-10-28 22:26:45 -04:00
.formatter.exs feat: support polymorphic relationships 2021-02-05 18:59:33 -05:00
.gitignore
CHANGELOG.md chore: release version v0.35.1 2021-03-02 12:49:27 -05:00
LICENSE Update LICENSE 2020-09-21 14:02:15 -04:00
mix.exs chore: release version v0.35.1 2021-03-02 12:49:27 -05:00
mix.lock fix: better embedded filters, switch to latest ash 2021-02-24 13:59:49 -05:00
README.md chore: update to latest ash 2020-12-27 01:20:12 -05:00

AshPostgres

Elixir CI License: MIT Coverage Status Hex version badge

AshPostgres supports all capabilities of an Ash data layer, and it will most likely stay that way, as postgres is the primary target/most maintained data layer.

Custom Predicates:

  • AshPostgres.Predicates.Trigram

DSL

See the DSL documentation in AshPostgres.DataLayer for DSL documentation

Usage

First, ensure you've added ash_postgres to your mix.exs file.

{:ash_postgres, "~> x.y.z"}

To use this data layer, you need to define an Ecto.Repo. AshPostgres 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

Generating Migrations

See the documentation for Mix.Tasks.AshPostgres.GenerateMigrations for how to generate migrations from your resources