MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / SetPragma

Function SetPragma

src/wallet/sqlite.cpp:102–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100}
101
102static void SetPragma(sqlite3* db, const std::string& key, const std::string& value, const std::string& err_msg)
103{
104 std::string stmt_text = strprintf("PRAGMA %s = %s", key, value);
105 int ret = sqlite3_exec(db, stmt_text.c_str(), nullptr, nullptr, nullptr);
106 if (ret != SQLITE_OK) {
107 throw std::runtime_error(strprintf("SQLiteDatabase: %s: %s\n", err_msg, sqlite3_errstr(ret)));
108 }
109}
110
111Mutex SQLiteDatabase::g_sqlite_mutex;
112int SQLiteDatabase::g_sqlite_count = 0;

Callers 1

OpenMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected