| 37 | { |
| 38 | sqlite3* get() const { return ptr.get(); } |
| 39 | void open(const fs::path& p, int flags) |
| 40 | { |
| 41 | sqlite3* ptr_tmp = nullptr; |
| 42 | int rc = sqlite3_open_v2(p.string().c_str(), &ptr_tmp, flags, nullptr); |
| 43 | ptr = sqlite3_ptr{ptr_tmp}; |
| 44 | if(rc != 0) |
| 45 | MIGRAPHX_THROW("error opening " + p.string() + ": " + error_message()); |
| 46 | } |
| 47 | |
| 48 | template <class F> |
| 49 | void exec(const char* sql, F f) |
no outgoing calls
no test coverage detected