mirror of
https://github.com/ash-project/ash_sqlite.git
synced 2024-09-19 12:52:50 +12:00
A SQLite data layer for Ash Framework
b0fa3ee2b5
Bumps [ex_doc](https://github.com/elixir-lang/ex_doc) from 0.32.0 to 0.32.1. - [Release notes](https://github.com/elixir-lang/ex_doc/releases) - [Changelog](https://github.com/elixir-lang/ex_doc/blob/main/CHANGELOG.md) - [Commits](https://github.com/elixir-lang/ex_doc/compare/v0.32.0...v0.32.1) --- updated-dependencies: - dependency-name: ex_doc dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> |
||
---|---|---|
.github | ||
.vscode | ||
config | ||
documentation | ||
lib | ||
logos | ||
priv | ||
test | ||
.check.exs | ||
.credo.exs | ||
.formatter.exs | ||
.gitignore | ||
.tool-versions | ||
CHANGELOG.md | ||
LICENSE | ||
mix.exs | ||
mix.lock | ||
README.md |
AshSqlite
Notice: Beta
This is a newly released library. You can expect some hiccups here and there. Please report any issues you find!
DSL
See the DSL documentation in AshSqlite.DataLayer
for DSL documentation
Usage
Add ash_qlite
to your mix.exs
file.
{:ash_sqlite, "~> 0.1.2-rc.0"}
To use this data layer, you need to chage your Ecto Repo's from use Ecto.Repo
, to use Sqlite.Repo
. because AshSqlite adds functionality to Ecto Repos.
Then, configure each of your Ash.Resource
resources by adding use Ash.Resource, data_layer: AshSqlite.DataLayer
like so:
defmodule MyApp.SomeResource do
use Ash.Resource, domain: MyDomain, data_layer: AshSqlite.DataLayer
sqlite do
repo MyApp.Repo
table "table_name"
end
attributes do
# ... Attribute definitions
end
end
Generating Migrations
See the documentation for Mix.Tasks.AshSqlite.GenerateMigrations
for how to generate migrations from your resources
Contributors
Ash is made possible by its excellent community!