MCPcopy Create free account
hub / github.com/ROCm/AMDMIGraphX / exec

Method exec

src/sqlite.cpp:49–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47
48 template <class F>
49 void exec(const char* sql, F f)
50 {
51 // cppcheck-suppress constParameterPointer
52 auto callback = [](void* obj, auto... xs) -> int {
53 try
54 {
55 const auto* g = static_cast<const F*>(obj);
56 (*g)(xs...);
57 return 0;
58 }
59 catch(...)
60 {
61 return -1;
62 }
63 };
64 int rc = sqlite3_exec(get(), sql, callback, &f, nullptr);
65 if(rc != 0)
66 MIGRAPHX_THROW(error_message());
67 }
68
69 std::string error_message() const
70 {

Callers 1

executeMethod · 0.45

Calls 1

getFunction · 0.85

Tested by

no test coverage detected