aboutsummaryrefslogtreecommitdiffstats
path: root/src/db.h
diff options
context:
space:
mode:
authorJose Bollo <jose.bollo@iot.bzh>2019-05-08 15:12:16 +0200
committerJose Bollo <jose.bollo@iot.bzh>2019-05-09 15:12:37 +0200
commited91352e50be1efcfa70e04f8d7e0761690837b9 (patch)
treeb4b41837d74f3336c089b06f3bd3973049932099 /src/db.h
parent97e91b39fceed0309b6863f508f92db2bcc3b114 (diff)
Rework transaction
Diffstat (limited to 'src/db.h')
-rw-r--r--src/db.h15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/db.h b/src/db.h
index a17d240..995fd65 100644
--- a/src/db.h
+++ b/src/db.h
@@ -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 */