Go to the documentation of this file.
46 connection_(connection), transactionActive_(
false) {
72 __FILE__, __LINE__,
"SQLiteConnection::updateQuery()",
180 "SQLiteConnection::tableExistsInDB()",
181 "Illegal call during active transaction.");
184 string query =
"SELECT count(*) "
185 "FROM sqlite_master "
186 "WHERE type = 'table' and name = '" + tableName +
"';";
193 int intBoolValue = 0;
200 "SQLiteConnection::tableExistsInDB()",
221 "SQLiteConnection::rowCountInTable()",
222 "Table was not found.");
224 string query =
"SELECT count(*) FROM " + tableName +
";";
237 "SQLiteConnection::tableExistsInDB()",
254 if (result != SQLITE_OK && result != SQLITE_ROW &&
255 result != SQLITE_DONE) {
272 sqlite3_stmt* stmt = NULL;
273 const char*
dummy = NULL;
276 connection_, queryString.c_str(), queryString.length(),
292 if (statement == NULL) {
308 string query =
"pragma user_version;";
321 "SQLiteConnection::version()",
336 string query =
"pragma user_version = " +
virtual int rowCountInTable(const std::string &tableName)
virtual const DataObject & data(std::size_t column) const =0
sqlite3_stmt * compileQuery(const std::string &queryString)
virtual void DDLQuery(const std::string &queryString)
int RowID
Type definition of row ID in relational databases.
virtual ~SQLiteConnection()
virtual void beginTransaction()
virtual RelationalDBQueryResult * query(const std::string &queryString, bool init=true)
#define assert(condition)
virtual int integerValue() const
void throwIfSQLiteError(int result)
virtual int updateQuery(const std::string &queryString)
SimValue dummy(32)
a dummy simvalue which is given for operands that are not bound
void finalizeQuery(sqlite3_stmt *statement)
virtual RowID lastInsertRowID()
std::string errorMessage() const
find Finds info of the inner loops in the false
sqlite3 * connection_
SQLite connection handle is saved to this.
virtual void updateVersion(int version)
SQLiteConnection(sqlite3 *connection)
virtual bool tableExistsInDB(const std::string &tableName)