mirror of
https://github.com/ash-project/ash_postgres.git
synced 2024-09-19 21:13:19 +12:00
chore: support adapter
option to use AshPostgres.Repo
This commit is contained in:
parent
90ae9aeef9
commit
7f3661ce42
2 changed files with 3 additions and 1 deletions
|
@ -82,7 +82,7 @@ defmodule AshPostgres.Repo do
|
|||
otp_app = opts[:otp_app] || raise("Must configure OTP app")
|
||||
|
||||
use Ecto.Repo,
|
||||
adapter: Ecto.Adapters.Postgres,
|
||||
adapter: opts[:adapter] || Ecto.Adapters.Postgres,
|
||||
otp_app: otp_app
|
||||
end
|
||||
|
||||
|
|
|
@ -79,6 +79,7 @@ defmodule AshPostgres.Test.Post do
|
|||
defaults([:destroy])
|
||||
|
||||
destroy :destroy_with_confirm do
|
||||
require_atomic?(false)
|
||||
argument(:confirm, :string, allow_nil?: false)
|
||||
|
||||
change(fn changeset, _ ->
|
||||
|
@ -93,6 +94,7 @@ defmodule AshPostgres.Test.Post do
|
|||
end
|
||||
|
||||
destroy :soft_destroy_with_confirm do
|
||||
require_atomic?(false)
|
||||
argument(:confirm, :string, allow_nil?: false)
|
||||
|
||||
change(fn changeset, _ ->
|
||||
|
|
Loading…
Reference in a new issue