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

Commit35b9cae

Browse files
committed
docs: update docs
1 parent4267d01 commit35b9cae

File tree

4 files changed

+43
-35
lines changed

4 files changed

+43
-35
lines changed

‎README.md‎

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,35 @@
55
[![Coverage Status](https://coveralls.io/repos/github/ash-project/ash_postgres/badge.svg?branch=master)](https://coveralls.io/github/ash-project/ash_postgres?branch=master)
66
[![Hex version badge](https://img.shields.io/hexpm/v/ash_postgres.svg)](https://hex.pm/packages/ash_postgres)
77

8-
The documentation for ash_postgres is available on[hexdocs](https://hexdocs.pm/ash_postgres/AshPostgres.html)
8+
AshPostgres supports all capabilities of an Ash data layer, and it will
9+
most likely stay that way, as postgres is the primary target/most maintained
10+
data layer.
11+
12+
Custom Predicates:
13+
14+
- AshPostgres.Predicates.Trigram
15+
16+
###Usage
17+
18+
First, ensure you've added ash_postgres to your`mix.exs` file.
19+
20+
```elixir
21+
{:ash_postgres,"~> x.y.z"}
22+
```
23+
24+
To use this data layer, you need to define an`Ecto.Repo`. AshPostgres adds some
25+
functionality on top of ecto repos, so you'll want to use`AshPostgres.Repo`
26+
27+
Then, configure your resource like so:
28+
29+
```elixir
30+
postgresdo
31+
repoMyApp.Repo
32+
table"table_name"
33+
end
34+
```
35+
36+
###Generating Migrations
37+
38+
See the documentation for`Mix.Tasks.AshPostgres.GenerateMigrations` for how to generate
39+
migrations from your resources

‎lib/data_layer.ex‎

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2,38 +2,6 @@ defmodule AshPostgres.DataLayer do
22
@moduledoc"""
33
A postgres data layer that levereges Ecto's postgres capabilities.
44
5-
AshPostgres supports all capabilities of an Ash data layer, and it will
6-
most likely stay that way, as postgres is the primary target/most maintained
7-
data layer.
8-
9-
Custom Predicates:
10-
11-
* AshPostgres.Predicates.Trigram
12-
13-
### Usage
14-
15-
First, ensure you've added ash_postgres to your `mix.exs` file.
16-
17-
```elixir
18-
{:ash_postgres, "~> x.y.z"}
19-
```
20-
21-
To use this data layer, you need to define an `Ecto.Repo`. AshPostgres adds some
22-
functionality on top of ecto repos, so you'll want to use `AshPostgres.Repo`
23-
24-
Then, configure your resource like so:
25-
26-
```elixir
27-
postgres do
28-
repo MyApp.Repo
29-
table "table_name"
30-
end
31-
```
32-
33-
### Generating Migrations
34-
35-
See the documentation for `Mix.Tasks.AshPostgres.GenerateMigrations` for how to generate
36-
migrations from your resources
375
"""
386

397
@manage_tenant%Ash.Dsl.Section{

‎lib/repo.ex‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ defmodule AshPostgres.Repo do
2626
@doc"Return a list of all schema names (only relevant for a multitenant implementation)"
2727
@callbackall_tenants()::[String.t()]
2828
@doc"The path where your tenant migrations are stored (only relevant for a multitenant implementation)"
29-
@callbacktenant_migration_path()::String.t()
29+
@callbacktenant_migrations_path()::String.t()
3030

3131
defmacro__using__(opts)do
3232
quotebind_quoted:[opts:opts]do

‎mix.exs‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,18 @@ defmodule AshPostgres.MixProject do
4848

4949
defpdocsdo
5050
[
51-
main:"AshPostgres",
51+
main:"readme",
5252
source_ref:"v#{@version}",
5353
logo:"logos/small-logo.png",
54+
extras:[
55+
"README.md",
56+
"documentation/multitenancy.md"
57+
],
58+
groups_for_extras:[
59+
guides:[
60+
"documentation/multitenancy.md"
61+
]
62+
],
5463
groups_for_modules:[
5564
"entry point":[AshPostgres],
5665
"data layer and dsl":~r/AshPostgres.DataLayer/,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp