postgrest-js icon indicating copy to clipboard operation
postgrest-js copied to clipboard

Support bulk update with array of partial items

Open aiibe opened this issue 1 year ago • 4 comments

I am able to bulk update items (even without a filter) with an array of partial items. Works fine but I had to cast my values .update(values as unknown as Partial<T>) while they are actually Partial<T>[]. Looking in the source code, it seems like update accept only a value at a time.

aiibe avatar Sep 08 '22 13:09 aiibe

Does this work with @supabase/postgrest-js@rc or @supabase/supabase-js@rc? We'll be releasing these as new versions soon.

soedirgo avatar Sep 09 '22 08:09 soedirgo

@soedirgo Haven't test with @supabase/postgrest-js@rc. I used @supabase/postgrest-js latest release.

aiibe avatar Sep 09 '22 09:09 aiibe

~Actually, rereading this again, does bulk update actually work for you right now? AFAIK this is still a WIP upstream: https://github.com/PostgREST/postgrest/issues/1959~

~cc @steve-chavez~

I should've looked more closely :) from the same issue: https://github.com/PostgREST/postgrest/issues/1959#issuecomment-925385920

So bulk update is actually not supported atm.

soedirgo avatar Sep 27 '22 09:09 soedirgo

Thought we had an issue tracking this - sorry about that! I'll repurpose this issue to track the bulk update feature.

soedirgo avatar Sep 27 '22 09:09 soedirgo

Closing in favor of https://github.com/supabase/postgrest-js/issues/174

soedirgo avatar May 28 '24 08:05 soedirgo