std::string API (implementing issue #13

This commit is contained in:
r4d2
2014-01-12 00:15:10 +01:00
parent d7f349ba62
commit 905c3d7bb5
4 changed files with 170 additions and 0 deletions

View File

@@ -30,6 +30,17 @@ Statement::Statement(Database &aDatabase, const char* apQuery) : // throw(SQLite
mColumnCount = sqlite3_column_count(mStmtPtr);
}
// Compile and register the SQL query for the provided SQLite Database Connection
Statement::Statement(Database &aDatabase, const std::string& aQuery) : // throw(SQLite::Exception)
mQuery(aQuery),
mStmtPtr(aDatabase.mpSQLite, mQuery), // prepare the SQL query, and ref count (needs Database friendship)
mColumnCount(0),
mbOk(false),
mbDone(false)
{
mColumnCount = sqlite3_column_count(mStmtPtr);
}
// Finalize and unregister the SQL query from the SQLite Database Connection.
Statement::~Statement(void) throw() // nothrow
{