mirror of
https://github.com/ash-project/ash.git
synced 2024-09-20 05:23:03 +12:00
chore: use ash_query as base count aggregate query
This commit is contained in:
parent
4200b5df50
commit
6f56f3c4db
1 changed files with 5 additions and 2 deletions
|
@ -3106,10 +3106,13 @@ defmodule Ash.Actions.Read do
|
|||
action: %{
|
||||
name: read_action
|
||||
}
|
||||
},
|
||||
} = ash_query,
|
||||
query
|
||||
) do
|
||||
case Ash.Query.Aggregate.new(destination_resource, :count, :count, read_action: read_action) do
|
||||
case Ash.Query.Aggregate.new(destination_resource, :count, :count,
|
||||
read_action: read_action,
|
||||
query: ash_query
|
||||
) do
|
||||
{:ok, aggregate} ->
|
||||
Ash.DataLayer.run_aggregate_query_with_lateral_join(
|
||||
query,
|
||||
|
|
Loading…
Reference in a new issue