Listen to real-time subscription using containedBy...
# javascript
a
Listen to real-time subscription using containedBy (or cs)
Hi, I have a question regarding the real-time functionalities. Right now we can call:
Copy code
js
supabase
.from('table:col.eq${value}')
.on(..., payload => ...);
I wonder if there's the equivalent for containedBy using the following snippet:
Copy code
js
supabase
.from('table:col.cs${value}')
.on(..., payload => ...);
g
No. At this time you only have a single .eq option as a filter with realtime subscriptions.
a
Thanks for the info. Do you know any workaround to this problem?
g
I have a secondary table I use a trigger function from another table to do insert/updates on, then do realtime on that table. It all depends on if you can do such a thing reasonably to get your logic.
a
Seems reasonable to me. Thanks for the answer!
g
You could also just get more realtime events and then do a select request to see if it your detail occurs. Once again it depends on how often you get updates to the table.