logoalt Hacker News

billywhizzyesterday at 8:42 PM1 replyview on HN

SQLite has a wal hook which calls you back every time a transaction is committed to the WAL. https://www.sqlite.org/c3ref/wal_hook.html


Replies

ncrucesyesterday at 8:50 PM

That only catches changes made by the database connection being "hooked."

This has a thread running in the background trying to catch changes made by other connections, potentially (I'm not sure here, but I suspect as much) in different processes that are modifying the same database.

show 1 reply