Closed mrspence closed 2 days ago
This is a limitation on the Realtime engine of Supabase.
Of course I discovered that relations cannot be used, which has led me here.
You should not change your database structure to work around the limitations of the tools that you are working with. With proper RLS in place, your users will not be able to read those messages that they are not allowed to read anyway, so you shouldn't need to add the filter you are trying to add anyway.
Very good point about RLS! Thank you
Describe the bug Flutter stream not working with filter that is more complex than a column name?
To Reproduce
Create a stream that listens to that table and applies an
eq
filter against it:print(chats)
only gets called once successfully and any changes made to the database does not work. Commenting out theeq
statement works, indicating that the problem lies within the websocket filtering.Upon investigating further, I can see that the websockets does also feature an error message that polls up repeatedly:
Expected behavior Changes to rows that match that
eq
filter should successfully sync, without any errors.Version (please complete the following information):
Additional context Currently trying to use a JSONB column map so I can track realtime changes to chats/messages that are linked to the authorized user. Of course I discovered that relations cannot be used, which has led me here. Open to other ideas and thank you for your time on this!