user142019
user142019

Reputation:

How can I make SQLite tell my application when the database file has changed?

I'm planning to make an application that has to save data in an SQLite database. Is there some way to make SQLite call a callback function when it has altered the database file?

I want to know when the database file has changed so I can make a new version of it.

Upvotes: 2

Views: 890

Answers (1)

vcsjones
vcsjones

Reputation: 141648

You are probably interested in writing an Rollback / Commit Hook. These are fairly well documented. You also have the option of writing a Update Hook as well, depending on your needs. I think you are best off using a commit hook; so that when the changes have been committed to the database, you can create a version.

Upvotes: 2

Related Questions