带有过滤器的supabase流不适用于删除操作
我有一个流从supabase中的表,插入和更新操作从表中进行更改的更改,当一个发生时,一个会更改flutter上的流并重新绘制小部件,但是如果我删除数据库中的一行或通过应用程序,则流不听。 。
这是在颤音上聆听的流守则。
Stream<List<Map<String, dynamic>>> response = clientSupabase
.from('PollSongs:id_pub=eq.$id')
.stream(['id'])
.order('likes', ascending: false)
.execute();
我尝试不使用.from('Pollsongs')而尝试使用相同的代码,并且所有操作都可以很好地插入,更新和删除。
Stream<List<Map<String, dynamic>>> response = clientSupabase
.from('PollSongs')
.stream(['id'])
.order('likes', ascending: false)
.execute();
I have one stream listening changes from a table in supabase, insert and update operations works fine, when occurs one change the stream on flutter listen and re draw the widget but if I delete one row in the database or through the app the stream not listen.
This is the code of stream that listen on flutter.
Stream<List<Map<String, dynamic>>> response = clientSupabase
.from('PollSongs:id_pub=eq.$id')
.stream(['id'])
.order('likes', ascending: false)
.execute();
I try without filter just using .from('PollSongs') and the same code and all operation works fine insert, update, and delete.
Stream<List<Map<String, dynamic>>> response = clientSupabase
.from('PollSongs')
.stream(['id'])
.order('likes', ascending: false)
.execute();
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对于不在
stream()
部分上记录此内容的道歉,但是您可以尝试运行以下SQL并查看是否修复了它?您可以在官方文档中阅读有关此配置的更多信息。
https://supabase.com/docs.com/docs/docs/docs/docs/docs/reference/reference/reference/javascript/subscript一下听力删除
Apologies for not documenting this on the
stream()
section, but could you try running the following SQL and see if it fixes it?You can read more about this configuration here in the official docs.
https://supabase.com/docs/reference/javascript/subscribe#listening-to-deletes