| 41 | } |
| 42 | |
| 43 | void sqlite::Dbi::exec(const char *statement, const char *err_msg) { |
| 44 | auto rc = sqlite3_exec(handle, statement, nullptr, nullptr, nullptr); |
| 45 | if (rc != SQLITE_OK) |
| 46 | throw Error((err_msg ? err_msg : "") + std::string(" sqlite error code=") + common::to_string(rc) + |
| 47 | " for db path=" + full_path); |
| 48 | } |
| 49 | void sqlite::Dbi::commit_txn() { |
| 50 | exec("COMMIT TRANSACTION", "saving database data failed. Disk unplugged or out of disk space?"); |
| 51 | } |
no test coverage detected