ParameterizedType is not supported, causing errors with Ash.
Closed this issue · 4 comments
Hello,
it looks like the Codec.float_decode does not support parameterized types, which causes crashes when using SQLite as a backend for Ash, as Ash uses a parameterized type for floats (to enable min/max limits, for example).
This thread on ElixirForum adds more context.
It would be great to add this support. At the moment I don't fully understand the boundary in responsibilities between ash_sqlite3 and ecto_sqlite3, but Ash developers seem to think that the issue should be fixed upstream.
Thank you for enabling Sqlite support for Elixir, and please let me know if you need any additional information.
It's seems that replacing
def float_decode(_), do: :errorwith
def float_decode(x), do: {:ok, x}as they do in myxql fixes the issue for me. I'm unsure if that's the right solution, but I can send a PR if it is.
Is the issue because the value is a float? IE a guard for is_float(x) entry would work. I know in myxql just throws its hands up and passes it along un-coerced, but I personally believe that is incorrect behavior.
Fixed and released under v0.18.0.
Wow, that was fast! Thank you so much @warmwaffles !