Hello all,

I am trying to use SQLite as a data store for a P2P (peer to peer) system. There could be several applications reading from and writing to the database. One of these is the P2P module. It reads local additions to the database (only INSERTs are allowed, rows are never DELETEd or UPDATEd) and distributes to to other peers. The P2P module also insert data it receives from other peers.

I would like to be able to distinguish data that has been written by the P2P module from data that has been written by other local applications. The latter data need to be handled by the P2P module, the former not (otherwise the data would de replicated over and over again).

I thought I could make use of a table that stores all DML statements from all applications except the P2P module. The P2P module could use that table as a task list, and periodically check if there is any unhandled DML in that table. All other applications could be made to write their DML to that table, but that is not very elegant. I would rather like this to be done automatically.

Is it possible to create a process (a trigger maybe) that monitors all DML statements and writes them to a table, except when the statement is issued by a specific application?

Or are there smarter ways of doing what I am trying to do?

Thanks in advance!

Frans
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to