| 562 | // --------------------------------------------------------------------------- |
| 563 | |
| 564 | std::unique_ptr<SQLiteStatement> DiskChunkCache::prepare(const char *sql) { |
| 565 | sqlite3_stmt *hStmt = nullptr; |
| 566 | sqlite3_prepare_v2(hDB_, sql, -1, &hStmt, nullptr); |
| 567 | if (!hStmt) { |
| 568 | pj_log(ctx_, PJ_LOG_ERROR, "%s", sqlite3_errmsg(hDB_)); |
| 569 | return nullptr; |
| 570 | } |
| 571 | return std::unique_ptr<SQLiteStatement>(new SQLiteStatement(hStmt)); |
| 572 | } |
| 573 | |
| 574 | // --------------------------------------------------------------------------- |
| 575 |
no test coverage detected