From 198d4aac190c28ab245fb979336c06cb0c51776c Mon Sep 17 00:00:00 2001 From: Mateusz Kaduk Date: Sun, 22 May 2005 05:48:22 +0000 Subject: Added main.h with database reference, opening and closing database --- src/sqlite/SQLiteWrapper.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/sqlite/SQLiteWrapper.cpp') diff --git a/src/sqlite/SQLiteWrapper.cpp b/src/sqlite/SQLiteWrapper.cpp index 6c7c45ad..eef2498f 100644 --- a/src/sqlite/SQLiteWrapper.cpp +++ b/src/sqlite/SQLiteWrapper.cpp @@ -22,6 +22,7 @@ 3. This notice may not be removed or altered from any source distribution. René Nyffenegger rene.nyffenegger@adp-gmbh.ch + Modified by Mateusz Kaduk mateusz.kaduk@gmail.com */ @@ -37,6 +38,13 @@ bool SQLiteWrapper::Open(std::string const& db_file) { return true; } +bool SQLiteWrapper::Close() { + if (sqlite3_close(db_) != SQLITE_OK) { + return false; + } + return true; +} + bool SQLiteWrapper::SelectStmt(std::string const& stmt, ResultTable& res) { char *errmsg; int ret; -- cgit v1.2.3-70-g09d2