diff options
author | dec05eba <dec05eba@protonmail.com> | 2018-05-15 00:09:17 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-08-18 23:25:46 +0200 |
commit | 54f53857279644914e0c2a2aed24060f31ed2575 (patch) | |
tree | 1244fa141230afe174af56710ebf47219051aaeb /include | |
parent | fa8d14018891d90e23fce0e510a01728970932f2 (diff) |
Implement exception safe sqlite transaction class (rollback)
Diffstat (limited to 'include')
-rw-r--r-- | include/odhtdb/sql/Sql.hpp | 11 |
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; + }; } |