aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2018-05-15 00:09:17 +0200
committerdec05eba <dec05eba@protonmail.com>2020-08-18 23:25:46 +0200
commit54f53857279644914e0c2a2aed24060f31ed2575 (patch)
tree1244fa141230afe174af56710ebf47219051aaeb /include
parentfa8d14018891d90e23fce0e510a01728970932f2 (diff)
Implement exception safe sqlite transaction class (rollback)
Diffstat (limited to 'include')
-rw-r--r--include/odhtdb/sql/Sql.hpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/odhtdb/sql/Sql.hpp b/include/odhtdb/sql/Sql.hpp
index 6c78360..cb740a4 100644
--- a/include/odhtdb/sql/Sql.hpp
+++ b/include/odhtdb/sql/Sql.hpp
@@ -34,4 +34,15 @@ namespace odhtdb
};
const Type type;
};
+
+ class SqlTransaction
+ {
+ public:
+ SqlTransaction(sqlite3 *db);
+ ~SqlTransaction();
+
+ void commit();
+ private:
+ sqlite3 *db;
+ };
}