From 3f6e5c8ee80bc6d730e57ff7752157b1e3242783 Mon Sep 17 00:00:00 2001 From: Zach Daniel Date: Mon, 20 May 2024 18:05:38 -0400 Subject: [PATCH] fix: allow all strategies for bulk actions in code interfaces by default --- lib/ash/code_interface.ex | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/ash/code_interface.ex b/lib/ash/code_interface.ex index 31972511..472e19b2 100644 --- a/lib/ash/code_interface.ex +++ b/lib/ash/code_interface.ex @@ -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