> Le 2 mai 2017 à 09:48, John Found <johnfo...@asm32.info> a écrit : > >> Reading your question I assume a single, multi-threaded, application. You >> could write a SQL function (see sqlite3_create_function_v2 and associates) >> which signal an event. And add a SQL trigger calling this function when >> appropriate. > > In my case I have several running applications that write in the database. > But isn't this solution applicable nevertheless? Maybe with some kind of IPC.
Of course. My comfort-zone is in Windows systems. An event can be shared by multiple processes. So that is an IPC. Equivalent things are of course available in all other platforms. Using a C-defined SQL function is not a requirement though. All you have to do is add C code right after each insert/update significant to you to 'signal' whatever IPC you have chosen to implement. The C-defined SQL function is just sugar on the cake to not forget to call that IPC mechanism from each and every place you would need it. Indeed the "database engine" is actually made up of both your C code calling SQLite API and SQLite itself. We took this path (C-defined SQL function) while upgrading a large code-base system which used another database engine which had a SQL mean to signal an EVENT to the client application. It was the simplest path to follow in that case, instead of patching the client code in hundreds locations and risk forgetting some. -- Best Regards, Meilleures salutations, Met vriendelijke groeten, Olivier Mascia, http://integral.software _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users