Hi, I'm also looking for this method. I checked around and eventually landed here.
I can clarify a little bit. The use case I would like Sequel to support is (PostgreSQL, more context <https://stackoverflow.com/questions/18797608/update-multiple-rows-in-same-query-using-postgresql> ) *update test as t * *set column_b = c.column_b* *from (values **(1, '123'), (2, '345') ) **as c(column_a, column_b) * *where c.column_a = t.column_a;* *-- Assume column_a is the primary key.* Do we have existing Sequel method that can make the query like the above ? As I'm not seeing there's such method in Sequel can do this kind of bulk update so far. Would really appreciate if we plan to introduce such feature ! Jiang On Thursday, June 6, 2019 at 7:13:13 AM UTC-7 Jeremy Evans wrote: > On Thursday, June 6, 2019 at 12:34:54 AM UTC-7, Wayne Chan wrote: >> >> Hi, >> Is there a way to use Sequel to update many row in one query, just like >> `multi_insert` insert many row at once. >> >> Thanks for any help! >> > > UPDATE in SQL can already update multiple rows in one query. By default, > without WHERE, it updates all rows in the table. You have to specifically > restrict it to single row if you only want to update a single row. So I > don't think adding multi_update makes sense. > > Thanks, > Jeremy > -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/sequel-talk/ac7cf5dc-0d20-4503-8936-9a1cf6a29cdan%40googlegroups.com.
