Uhhhh...write one? As noted -- no DBMS provides this type of interface that I've ever seen...as intuitive as you may think it is. They would end up doing the same thing that was suggested here. What you need is to set up a trigger, then write your own sqlite_execute_select_query(string query, int timeout); And use sleep() inside it. There are other mechanism to suspend your program but they're a bit obtuse and not as bullet proof as sleep(). Inside your function you will query the trigger table Anything wrong with that? Your trigger table can be an auto-update counter, or a list of ID's, or whatever you want. Depends what you're trying to do. Sounds like you just want to query an update counter and perform the main query when it changes. You could also write it as a callback function and just thread it so it runs in it's own process and calls functions within your program. So many solutions....so little time... Michael D. Black Senior Scientist Northrop Grumman Mission Systems
________________________________ From: sqlite-users-boun...@sqlite.org on behalf of Serdar Genc Sent: Thu 4/29/2010 6:21 AM To: General Discussion of SQLite Database Subject: Re: [sqlite] SQlite trigger issues Do you have any idea how I can get a callback from SQlite for this issue? Thanks, Serdar -> http://www.iptakip.com <http://www.iptakip.com/> On Thu, Apr 29, 2010 at 2:17 PM, Pavel Ivanov <paiva...@gmail.com> wrote: > > Our system is a real-time applcation and delivering this data to > subscribers > > is very > > important. > > When you insert infogram notify other interested parties so that they > can work with it. Each OS has a lot of different IPC mechanisms > specially designed for this purpose. If you are working in a single > process your life even easier than that. > > > Pavel > > On Thu, Apr 29, 2010 at 7:11 AM, Serdar Genc <serdar.g...@gmail.com> > wrote: > > I don't want to do this with sleep.. If there is a callback mechanism for > > sqlite then > > it is preferable to implement this by using them. We are trying to > implement > > sqlite > > in our system and this is a crucial requirement for our API that we > provide > > to the users. > > Our system is a real-time applcation and delivering this data to > subscribers > > is very > > important. > > > > On Thu, Apr 29, 2010 at 2:04 PM, Pavel Ivanov <paiva...@gmail.com> > wrote: > > > >> Database engines never worked and hopefully never will work this way. > >> You can easily implement it in your application: execute query, if no > >> new infograms found then sleep for some time, check that total time > >> passed doesn't exceed your limit, repeat everything from beginning. > >> > >> > >> Pavel > >> > >> On Thu, Apr 29, 2010 at 6:46 AM, Serdar Genc <serdar.g...@gmail.com> > >> wrote: > >> > My case is a little bit complex. Let me make a brief explanation about > >> it. > >> > Suppose you write a complex SQL query (preferably a select query) and > >> send > >> > this as a parameter > >> > and waiting for its return value.. In this case, I would like to add a > >> > defined period for the sqlite query > >> > to wait. (30 seconds for instance). If infograms are inserted into my > >> > database during this period then I > >> > would like to be notified and take it. > >> > > >> > sqlite_execute_select_query(string query, int timeout); // this call > will > >> > suspend the execution of the application > >> > > >> > if an infogram is inserted that we would like to get according to our > SQL > >> > query then we continue the execution and > >> > obtain that query. > >> > > >> > I think of creating a view for that SQL query and try to create > trigger > >> for > >> > that view bla bla but no progress till now.. > >> > > >> > Has anyone got any idea how to do so.. > >> > > >> > Thanks in advance, > >> > Serdar > >> > > >> > -> http://www.iptakip.com <http://www.iptakip.com/> > >> > _______________________________________________ > >> > sqlite-users mailing list > >> > sqlite-users@sqlite.org > >> > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > >> > > >> _______________________________________________ > >> sqlite-users mailing list > >> sqlite-users@sqlite.org > >> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > >> > > _______________________________________________ > > sqlite-users mailing list > > sqlite-users@sqlite.org > > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > > > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users