| 60 | } |
| 61 | |
| 62 | void bind_text(int pos, const std::string &text) { |
| 63 | if (sqlite3_bind_text(stmt_, pos, text.c_str(), text.size(), SQLITE_TRANSIENT)) { |
| 64 | std::stringstream err_msg; |
| 65 | err_msg << "Failed to bind text parameter" |
| 66 | << pos |
| 67 | << ": " |
| 68 | << text |
| 69 | << " because " |
| 70 | << sqlite3_errmsg(db_); |
| 71 | throw std::runtime_error(err_msg.str()); |
| 72 | } |
| 73 | } |
| 74 | |
| 75 | void bind_int64(int pos, uint64_t val) { |
| 76 | if (sqlite3_bind_int64(stmt_, pos, val)) { |