mirror of
https://github.com/ash-project/ash_postgres.git
synced 2024-09-19 13:03:14 +12:00
improvement: properly show unsupported error expression
This commit is contained in:
parent
5a513a82c2
commit
ec75b41dbe
2 changed files with 7 additions and 0 deletions
|
@ -3,6 +3,7 @@ This file was generated by Spark. Do not edit it by hand.
|
|||
-->
|
||||
# DSL: AshPostgres.DataLayer
|
||||
|
||||
A postgres data layer that leverages Ecto's postgres capabilities.
|
||||
|
||||
|
||||
## postgres
|
||||
|
|
|
@ -515,6 +515,12 @@ defmodule AshPostgres.DataLayer do
|
|||
|
||||
def can?(_, :timeout), do: true
|
||||
def can?(_, :expr_error), do: true
|
||||
|
||||
def can?(resource, {:filter_expr, %Ash.Query.Function.Error{}}) do
|
||||
"ash-functions" in AshPostgres.DataLayer.Info.repo(resource, :read).installed_extensions() &&
|
||||
"ash-functions" in AshPostgres.DataLayer.Info.repo(resource, :mutate).installed_extensions()
|
||||
end
|
||||
|
||||
def can?(_, {:filter_expr, _}), do: true
|
||||
def can?(_, :nested_expressions), do: true
|
||||
def can?(_, {:query_aggregate, _}), do: true
|
||||
|
|
Loading…
Reference in a new issue