Skip to content

Commit ceaddcc

Browse files
committed
improvement: support combination_acc/1 function to get current combination accumulator
1 parent 428a01e commit ceaddcc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/query.ex

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ defmodule AshSql.Query do
1313
|> Map.put(:__ash_domain__, domain)
1414
end
1515

16+
def combination_acc(query), do: query.__ash_bindings__.current
17+
1618
def combination_of(
1719
[{:base, first} | combination_of],
1820
_resource,
@@ -50,7 +52,7 @@ defmodule AshSql.Query do
5052
500
5153
else
5254
if context[:data_layer][:previous_combination] do
53-
context[:data_layer][:previous_combination].__ash_bindings__.current
55+
context[:data_layer][:previous_combination]
5456
else
5557
0
5658
end

0 commit comments

Comments
 (0)