WIP: This is not ready for use at all, very much work in progress.
AshEdgeDB supports all the capabilities of an Ash data layer. AshEdgeDB is the primary Ash data layer.
Custom Predicates:
AshEdgeDB.Predicates.Trigram
See the DSL documentation in AshEdgeDB.DataLayer
for DSL documentation
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
See the documentation for Mix.Tasks.AshEdgeDB.GenerateMigrations
for how to generate
migrations from your resources
Ash is made possible by its excellent community!