Skip to content

Latest commit

 

History

History
61 lines (40 loc) · 1.8 KB

README.md

File metadata and controls

61 lines (40 loc) · 1.8 KB

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