Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit79cba45

Browse files
committed
fix: type cast atoms to strings in last ditch cast
1 parent5ff91a6 commit79cba45

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

‎lib/data_layer.ex‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1920,7 +1920,9 @@ defmodule AshPostgres.DataLayer do
19201920

19211921
defpdo_filter_to_expr(value,_bindings,params,false,type)do
19221922
type=type||:any
1923-
value=last_ditch_cast(value,type)
1923+
IO.inspect(value)
1924+
IO.inspect(type)
1925+
value=last_ditch_cast(value,type)|>IO.inspect(label:"casted")
19241926

19251927
{params++[{value,type}],{:^,[],[Enum.count(params)]}}
19261928
end
@@ -1935,7 +1937,11 @@ defmodule AshPostgres.DataLayer do
19351937

19361938
defpmaybe_ecto_type(_type),do:nil
19371939

1938-
defplast_ditch_cast(value,:string)whenis_atom(value)do
1940+
defplast_ditch_cast(value,{:in,type})whenis_list(value)do
1941+
Enum.map(value,&last_ditch_cast(&1,type))
1942+
end
1943+
1944+
defplast_ditch_cast(value,_)whenis_atom(value)do
19391945
to_string(value)
19401946
end
19411947

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp