Closed ruslandoga closed 4 months ago
@ruslandoga this looks good to me, but I think we will need to change ecto_sql adapters to raise if they receive a map. Can you please send a PR on that side as well?
I didn't think it through and didn't realize it would affect existing adapters.
Now I think it'd be safer to re-implement these Ecto.Adapters.SQL.query
calls in ecto_ch but with a more permissive type signature.
Sorry!
Since the alternative approach didn't work out, I'm reopening this PR :)
I made the existing adapters raise on non-list params in https://github.com/elixir-ecto/ecto_sql/pull/614/commits/a8ca22c7c4ecf056c86a3c14e92b075751489ce6
:green_heart: :blue_heart: :purple_heart: :yellow_heart: :heart:
👋
ClickHouse supports named params and Ch expresses them as maps:
However using this via Ecto.Repo (and Ecto.Adapters.SQL) raises Dialyzer warnings:
This query works but gets a squiggly underline in VSCode and also gets flagged by
mix dialyzer