fix: allow all strategies for bulk actions in code interfaces by default

This commit is contained in:
Zach Daniel 2024-05-20 18:05:38 -04:00
parent 807ed72e89
commit 3f6e5c8ee8

View file

@ -836,6 +836,7 @@ defmodule Ash.CodeInterface do
bulk_opts
end
end)
|> Keyword.put_new(:strategy, [:atomic, :stream, :atomic_batches])
bulk_opts =
if method in [:stream, :query] do
@ -899,6 +900,7 @@ defmodule Ash.CodeInterface do
bulk_opts
end
end)
|> Keyword.put_new(:strategy, [:atomic, :stream, :atomic_batches])
bulk_opts =
if method in [:stream] do
@ -1039,6 +1041,7 @@ defmodule Ash.CodeInterface do
Keyword.put(bulk_opts, :return_records?, opts[:return_destroyed?])
end
end)
|> Keyword.put_new(:strategy, [:atomic, :stream, :atomic_batches])
bulk_opts =
if method in [:stream, :query] do
@ -1107,6 +1110,7 @@ defmodule Ash.CodeInterface do
Keyword.put(bulk_opts, :return_records?, opts[:return_destroyed?])
end
end)
|> Keyword.put_new(:strategy, [:atomic, :stream, :atomic_batches])
bulk_opts =
if method in [:stream, :query] do