Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

The PostgreSQL data layer for Ash Framework

License

NotificationsYou must be signed in to change notification settings

RoyalIcing/ash_postgres

 
 

Repository files navigation

Elixir CILicense: MITCoverage StatusHex version badge

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

Custom Predicates:

  • AshPostgres.Predicates.Trigram

DSL

See the DSL documentation inAshPostgres.DataLayer for DSL documentation

Usage

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

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

To use this data layer, you need to chage your Ecto Repo's fromuse Ecto.Repo,touse AshPostgres.Repo. because AshPostgres adds functionality to Ecto Repos.

Then, configure each of yourAsh.Resource resources by addinguse Ash.Resource, data_layer: AshPostgres.DataLayer like so:

defmoduleMyApp.SomeResourcedouseAsh.Resource,data_layer:AshPostgres.DataLayerpostgresdorepoMyApp.Repotable"table_name"endattributesdo# ... Attribute definitionsendend

Generating Migrations

See the documentation forMix.Tasks.AshPostgres.GenerateMigrations for how to generatemigrations from your resources

About

The PostgreSQL data layer for Ash Framework

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Elixir100.0%

[8]ページ先頭

©2009-2025 Movatter.jp