From 5f504f2e89e95e70d9551ae9c99009d93af157f5 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Sun, 10 Jan 2010 21:43:49 +0100 Subject: added sqlite3_prepare_v2 wrapper with propper logging --- src/base/database.hpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/base/database.hpp') diff --git a/src/base/database.hpp b/src/base/database.hpp index 8e589feb..c984fcfd 100644 --- a/src/base/database.hpp +++ b/src/base/database.hpp @@ -54,6 +54,18 @@ namespace usdx */ sqlite3 *database; + /** + * Wrapper arround the sqlite_prepare_v2 function with propper + * logging and exception throwing on error. + * + * @param sqlStatement SQL Statement for preparing to + * sqlite3_stmt + * @return Pointner to a sqlite3_stmt used for binding + * parameters and excuting the statement. Need to be freed + * with sqlite3_finalize. + */ + sqlite3_stmt *sqlite_prepare(const std::string sqlStatement); + // Singleton StatDatabase(std::string filename); -- cgit v1.2.3