Hi!
Yes, your application can be notified of a downstream synchronization update.
But it is not done via the update_hook
yet, mainly because most wrappers do not support it.
You must create an user function that will be called each time an incoming update happens.
Here is an example in Python:
def on_db_update(arg):
print "update received"
return None
con.create_function("update_notification", 1, on_db_update)
And in C:
static void on_db_update(sqlite3_context *context, int argc, sqlite3_value **argv){
puts("update received");
sqlite3_result_null(context);
}
sqlite3_create_function(db, "update_notification", 1, SQLITE_UTF8 | SQLITE_DETERMINISTIC, NULL, &on_db_update, NULL, NULL);
ATTENTION: The function is called by the worker thread!
Your application must send the notification to the main thread and return as fast as possible!
For now the function has no additional information as of which tables and rows were affected. This extended functionality may be implemented in the future.