-
-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Listen to data using the .eq filter not working properly #319
Comments
Thanks @jvlt for opening this issue. Yup, that behavior is buggy. I will fix it right now! |
Just to break down the issue, this is an issue on the SDK side, and can be fixed with the PR above.
This on the other hand is happening due to the current limitation on our realtime server. I have opened an issue here, so let's see if there is a way to work around it.
|
Thanks @dshukertjr! |
There probably isn't anything we can do on the client side. Because the server does not emit the fact that the row went from |
@jvlt what did you end up doing to track this? |
I do have same problem when using stream with .eq though as mine is reading inside to a json data
it wont stream whenever i change in the db it won't listen is there a way to fix this? |
@Erchil66 That seems like a separate issue. Would you be able to open a separate issue for it? |
Sure, @dshukertjr |
Describe the bug
Maybe I am missing something, but there seems to be a bug when using the .eq filter in streaming data via realtime.
To Reproduce
Steps to reproduce the behavior:
col
)supabase.from('example').stream(primaryKey: ['id']).eq('col', true);
Expected behavior
Lets say there are 2 rows where
col
is true. These two are delivered to the device and an event is registered everytime something changes in these rows. So far so good. But:If a different row gets
col
set to true, the SDK throws the following error:Unhandled Exception: Exception: Could not find the updated record.
The expected behavior would be for the SDK to deliver 3 rows.
Furthermore, if a row A that previously had
col = true
gets set tocol = false
, there is no event emitted. Additionally, if something changes in a row where col is still set to true, the row A will still be emitted in the event, but in the state before col was set to false.Smartphone (please complete the following information):
Version:
supabase_flutter: ^1.2.1
Additional context
Complete error message:
The text was updated successfully, but these errors were encountered: