Listen/Notify?
"Andrea Gavana" <[email protected]>
| Newsgroups | gmane.comp.python.db.pysqlite.user |
|---|---|
| Message-ID | <[email protected]> |
Hi All,
sorry for my newbieness, I really know too little about pysqlite.
I was wondering if pysqlite supports commands like LISTEN/NOTIFY,
which I could use to update my GUI when the database "sees" a change
made by another user. My application is a multiuser graphical
interface, and I would like to update the GUI based on database
modifications. The actions I would do are:
- put an INSERT/UPDATE/DELETE trigger on the table(s) I
want to be informed about on change
- in the trigger send a NOTIFY
- in the frontend start a new thread which LISTENs to the
NOTIFYs sent by the backend
- when a NOTIFY arrives post an appropriate event into your
GUI thread (I usually use wx.CallAfter)
It is a very good suggestion I got from a wxPython user, and I just
wanted to know if it is possible to do it with pysqlite (he is using
PostgreSQL).
Thank you in advance for your suggestions.
Andrea.
"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.virgilio.it/infinity77/