diff options
author | Jose Bollo <jose.bollo@iot.bzh> | 2019-05-08 15:12:16 +0200 |
---|---|---|
committer | Jose Bollo <jose.bollo@iot.bzh> | 2019-05-09 15:12:37 +0200 |
commit | ed91352e50be1efcfa70e04f8d7e0761690837b9 (patch) | |
tree | b4b41837d74f3336c089b06f3bd3973049932099 /src/db.h | |
parent | 97e91b39fceed0309b6863f508f92db2bcc3b114 (diff) |
Rework transaction
Diffstat (limited to 'src/db.h')
-rw-r--r-- | src/db.h | 15 |
1 files changed, 5 insertions, 10 deletions
@@ -38,22 +38,17 @@ bool db_is_empty( ); -/** sync the database */ +/** enter atomic mode */ extern int -db_sync( +db_transaction_begin( ); -/** make a backup of the database */ +/** leave atomic mode */ extern int -db_backup( -); - -/** recover the database from latest backup */ -extern -int -db_recover( +db_transaction_end( + bool commit ); /** enumerate */ |