jason-lynx
09/22/2021, 6:34 AMfp
09/22/2021, 9:52 AMKKH
09/22/2021, 10:17 AMsupabase.from('room_events:some_condition').on('*') => { //do stuff }
The part i'm struggling with is to notify all other room users when someone leaves the room. I have tried tried to do this from the client by firing a supabase.rpc('user_left')
on window.beforeunload
and when room component unloads but i feel this feels too flaky and won't cover browser crash etc. With my previous approach i emitted broadcast message to all room users from the server on a socket disconnect
event.
Is something similar possible with supabase? I'm thinking Postgres could have these capabilities but i'm quite new to it so have just started exploring it.Tessellated
09/22/2021, 10:39 AMuser
09/22/2021, 10:59 AMid_internal
which is a string, and i want it to be the base for the upsert matching. However I assume the upsert method matches the documents by the default int8 id
key, which i don't have in the documents i want to upsert (i leave supabase generating them, and the incoming data i get for the upsert is scraped from a remote source). Any way i can choose which field to match against here ?Tessellated
09/22/2021, 11:09 AMTessellated
09/22/2021, 11:09 AMTessellated
09/22/2021, 11:18 AMMew
09/22/2021, 11:59 AMuser
09/22/2021, 12:14 PMMarky
09/22/2021, 2:18 PMVik
09/22/2021, 7:20 PMVik
09/22/2021, 8:45 PMAlexM
09/22/2021, 11:39 PMjon
09/22/2021, 11:41 PM.csv()
?
example resp:
organization_id
"{""name"":""Amperity"",""domain"":null}"
desired resp:
organization_name, organization_domain
"Amperirty", "null"
jason-lynx
09/23/2021, 4:08 AMMarky
09/23/2021, 9:15 AMbh
09/23/2021, 10:15 AMbh
09/23/2021, 10:16 AMMarky
09/23/2021, 10:16 AMMarky
09/23/2021, 10:17 AMbh
09/23/2021, 10:17 AMbh
09/23/2021, 10:18 AMMarky
09/23/2021, 10:19 AMbh
09/23/2021, 10:31 AMbh
09/23/2021, 10:32 AMsilentworks
09/23/2021, 10:55 AMstibbs
09/23/2021, 10:58 AMMarky
09/23/2021, 3:02 PM