plausible / ecto_ch

ClickHouse adapter for Ecto
MIT License
79 stars 11 forks source link

support update statements #169

Closed jaronoff97 closed 5 months ago

jaronoff97 commented 5 months ago

it would be great if this package supported Repo.update by using the correct clickhouse ALTER TABLE statement rather than erroring. Everything else has worked seamlessly, so this would be great :)

ruslandoga commented 5 months ago

👋

I was thinking about adding custom Repo.alter_update and Repo.alter_update_all functions but then forgot. I'll try to add something today: https://github.com/plausible/ecto_ch/pull/172

I'd like to reserve Repo.update and Repo.update_all for when or if the real UPDATE statements land in ClickHouse.

jaronoff97 commented 5 months ago

Yeah! that'd be great :D thank you! For now, I changed to use a versioned insert approach to avoid doing any table alterations, but this would be great.

ruslandoga commented 5 months ago

I added Repo.alter_update_all in https://github.com/plausible/ecto_ch/pull/172 and released it as v0.3.7.

jaronoff97 commented 5 months ago

Thank you so much!! Unblocks a bunch of stuff for me. I appreciate the fast turn around and your work here!