deviprsd / ash_edgedb

A postgresql datalayer for the Ash Framework

Home Page:https://hexdocs.pm/ash_postgres

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WIP: This is not ready for use at all, very much work in progress.

AshEdgeDB

Elixir CI License: MIT Coverage Status Hex version badge

AshEdgeDB supports all the capabilities of an Ash data layer. AshEdgeDB is the primary Ash data layer.

Custom Predicates:

  • AshEdgeDB.Predicates.Trigram

DSL

See the DSL documentation in AshEdgeDB.DataLayer for DSL documentation

Usage

Add ash_edgedb to your mix.exs file.

{:ash_edgedb, "~> 1.3.6"}

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

Then, configure each of your Ash.Resource resources by adding use Ash.Resource, data_layer: AshEdgeDB.DataLayer like so:

defmodule MyApp.SomeResource do
  use Ash.Resource, data_layer: AshEdgeDB.DataLayer

  edgedb do
    repo MyApp.Repo
    table "table_name"
  end

  attributes do
    # ... Attribute definitions
  end
end

Generating Migrations

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

Contributors

Ash is made possible by its excellent community!

Become a contributor

About

A postgresql datalayer for the Ash Framework

https://hexdocs.pm/ash_postgres

License:MIT License


Languages

Language:Elixir 100.0%