Helper function to execute a prepared statement
| 44 | |
| 45 | // Helper function to execute a prepared statement |
| 46 | void execStatement(sqlite3_stmt* stmt) |
| 47 | { |
| 48 | const int rc = sqlite3_step(stmt); |
| 49 | if(rc != SQLITE_DONE && rc != SQLITE_ROW) |
| 50 | { |
| 51 | throw RuntimeError(std::string("Failed to execute statement: ") + std::to_string(rc)); |
| 52 | } |
| 53 | sqlite3_finalize(stmt); |
| 54 | } |
| 55 | |
| 56 | } // namespace |
| 57 |
no test coverage detected