We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
cast_in_query?/2
1 parent 301466e commit 87617f8Copy full SHA for 87617f8
lib/types/types.ex
@@ -23,7 +23,14 @@ defmodule AshPostgres.Types do
23
24
def parameterized_type(type, constraints) do
25
if Ash.Type.ash_type?(type) do
26
- if Ash.Type.cast_in_query?(type) do
+ cast_in_query? =
27
+ if function_exported?(Ash.Type, :cast_in_query?, 2) do
28
+ Ash.Type.cast_in_query?(type, constraints)
29
+ else
30
+ Ash.Type.cast_in_query?(type)
31
+ end
32
+
33
+ if cast_in_query? do
34
parameterized_type(Ash.Type.ecto_type(type), constraints)
35
else
36
nil
0 commit comments