aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authordec05eba <0xdec05eba@gmail.com>2018-05-15 00:09:17 +0200
committerdec05eba <0xdec05eba@gmail.com>2018-05-15 00:09:20 +0200
commit4a0d1ff39ec150d8e8c04ca846b3116884e1774e (patch)
tree9c8d64cfdbcd395ab0e1f94751791ed3020c4b84 /include
parent2260790118358449a18527fcd9e6ff46d2caccf7 (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;
+ };
}