1

anyone know of:

  • a utility that will run on the Apple Mac that will
  • listen to changes on a set of tables on a local sqlite table and via
  • a configuration mechanism to then
  • HTTP post those ongoing changes as JSON requests
  • to a remote http or apache camel server?

Thanks, Martin.

Martin Cleaver
  • 909
  • 8
  • 21
  • SQLite has no notification mechanism; this would require polling. Can't you do this in the application that changes the DB? – CL. Nov 29 '12 at 13:46
  • No, as I have various applications that I want to monitor and I want to do so without the cooperation/modification of the applications that control the data. – Martin Cleaver Nov 30 '12 at 15:14
  • I did note (on http://sqliteexpert.com/forum/YaBB.pl?num=1316061412/0 ) that sqlite has a TRIGGER - can this be used by a utility? – Martin Cleaver Nov 30 '12 at 16:18
  • Getting a notification out of a trigger would require a user-defined function, but those various applications won't be so helpful as to install one for you. – CL. Nov 30 '12 at 20:51
  • Comment on irc: Chunky_Ks: MartinCleaver: as mentioned in the answers to your post... I don't think it's on the cards as sqlite comes in the box [11:39am] MartinCleaver: Okay - so you agree that to your knowledge - there's no utility that will attach itself to an SQLite installation, loo at the databases and tables and add a trigger to particular table that calls an external piece of code when CRUD operations occur? – Martin Cleaver Dec 02 '12 at 19:20
  • SQLite is an *embedded* database. There cannot be an external piece of code; all code is internal to the application itself. – CL. Dec 02 '12 at 21:17
  • It shouldn't be too difficult to create such a utility yourself, using the sqlite3_update_hook() function as the starting point. – Michael Dec 11 '12 at 21:10
  • http://stackoverflow.com/questions/6145826/node-js-monitoring-a-database-for-changes looks like a workable approach. – Martin Cleaver Dec 29 '13 at 03:22

0 Answers0