| 584 | // --------------------------------------------------------------------------- |
| 585 | |
| 586 | std::unique_ptr<SQLiteStatement> DiskChunkCache::prepare(const char *sql) { |
| 587 | sqlite3_stmt *hStmt = nullptr; |
| 588 | sqlite3_prepare_v2(hDB_, sql, -1, &hStmt, nullptr); |
| 589 | if (!hStmt) { |
| 590 | pj_log(ctx_, PJ_LOG_ERROR, "%s", sqlite3_errmsg(hDB_)); |
| 591 | return nullptr; |
| 592 | } |
| 593 | return std::unique_ptr<SQLiteStatement>(new SQLiteStatement(hStmt)); |
| 594 | } |
| 595 | |
| 596 | // --------------------------------------------------------------------------- |
| 597 |
no test coverage detected