mirror of
https://github.com/ash-project/ash_postgres.git
synced 2024-09-20 13:33:50 +12:00
A postgresql datalayer for the Ash Framework
.github | ||
config | ||
documentation | ||
lib | ||
logos | ||
priv | ||
test | ||
.check.exs | ||
.credo.exs | ||
.formatter.exs | ||
.gitignore | ||
CHANGELOG.md | ||
LICENSE | ||
mix.exs | ||
mix.lock | ||
README.md |
AshPostgres
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
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