Skip to content

Commit

Permalink
chore: clearer support for individual aggregates in can?/2
Browse files Browse the repository at this point in the history
  • Loading branch information
zachdaniel committed Jan 26, 2025
1 parent da99b82 commit f60b7dd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/data_layer.ex
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,11 @@ defmodule AshSqlite.DataLayer do
def can?(_, {:filter_expr, %Ash.Query.Function.StringJoin{}}), do: false
def can?(_, {:filter_expr, _}), do: true
def can?(_, :nested_expressions), do: true
def can?(_, {:query_aggregate, _}), do: true

def can?(_, {:query_aggregate, kind})
when kind in [:count, :first, :sum, :max, :min, :avg, :exists],
do: true

def can?(_, :sort), do: true
def can?(_, :distinct_sort), do: false
def can?(_, :distinct), do: false
Expand Down

0 comments on commit f60b7dd

Please sign in to comment.