SQLite As Application File Format - Second Approach
Page 35 of 41
[
prev
] [
next
]
Features:
File/Open menu option does
sqlite3 db $filename
Immediately begin a transaction:
db eval BEGIN
File/Save commits the transaction:
db eval COMMIT
Advantages:
Do not need to read in the whole file - only those parts in active use
Uncommitted changes automatically rollback after a crash or power failure
User can abandon changes using ROLLBACK
Disadvantages:
Work might be lost following a crash or power failure
Commit might fail if there are other readers active