Eitan H.S.
Eitan H.S.

Reputation: 430

How can I determine whether any changes were made between savepoints in SQLite?

I wonder if anyone knows if it is possible to determine if changes were made since a given savepoint was created. I'm thinking about using this to find out if user made changes, and then ask if he wants to save or not before moving to another page / closing the app..

Thanks in advance, Eitan.

Upvotes: 1

Views: 251

Answers (1)

CL.
CL.

Reputation: 180010

Check if the return value of total_changes() (SQL) or sqlite3_total_changes()(C) has increased. (However, this does include changes from rolled-back savepoints/transactions.)

Upvotes: 1

Related Questions