| 90 | } |
| 91 | |
| 92 | Size SqliteConnector::countTableRows(const String& table_name) |
| 93 | { |
| 94 | sqlite3_stmt* stmt; |
| 95 | String select_runs = "SELECT count(*) FROM " + table_name + ";"; |
| 96 | this->prepareStatement(&stmt, select_runs); |
| 97 | sqlite3_step(stmt); |
| 98 | if (sqlite3_column_type(stmt, 0) == SQLITE_NULL) |
| 99 | { |
| 100 | throw Exception::SqlOperationFailed(__FILE__, __LINE__, OPENMS_PRETTY_FUNCTION, "Could not retrieve " + table_name + " table count!"); |
| 101 | } |
| 102 | Size res = sqlite3_column_int64(stmt, 0); |
| 103 | sqlite3_finalize(stmt); |
| 104 | return res; |
| 105 | } |
| 106 | |
| 107 | void SqliteConnector::executeStatement(sqlite3 *db, const String& statement) |
| 108 | { |
no test coverage detected