Skip to content

Commit 968ea19

Browse files
committed
fix: properly check query aggregate support
This check was incorrectly forbidding the use of counted pagination with `AshSqlite`.
1 parent 0975ea5 commit 968ea19

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

lib/ash/query/aggregate.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ defmodule Ash.Query.Aggregate do
396396
end
397397

398398
defp validate_supported(resource, kind, nil) do
399-
if Ash.DataLayer.data_layer_can?(resource, {:aggregate, kind}) do
399+
if Ash.DataLayer.data_layer_can?(resource, {:query_aggregate, kind}) do
400400
:ok
401401
else
402402
{:error, AggregatesNotSupported.exception(resource: resource, feature: "using")}

lib/ash/resource.ex

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ defmodule Ash.Resource do
55
[Resource DSL documentation](dsl-ash-resource.html)
66
"""
77

8+
def foo do
9+
# x + y + z
10+
11+
1 - 2 - 3
12+
end
13+
814
@type t :: module
915
@type record :: struct()
1016

0 commit comments

Comments
 (0)