tekartik / sqflite

SQLite flutter plugin
BSD 2-Clause "Simplified" License
2.87k stars 522 forks source link

Can you tell me the general area on how to create a stream/watch a table? #1103

Open ember11498 opened 5 months ago

ember11498 commented 5 months ago

I want to watch if a table is changed. What are the general steps I need to make in order to achieve this?

Do you just use streamcontrollers or you also use like Notify in sql?

alextekartik commented 4 months ago

This is not supported in sqflite

ember11498 commented 4 months ago

This is not supported in sqflite

Which means we need to use some logic with stream controllers

alextekartik commented 4 months ago

You can implement your own notification mechanism (stream controllers or other) for example by forcing a refresh when an insert/update/delete is done on one table. I have personally use something similar but nothing generic so far.