MCPcopy Create free account
hub / github.com/bcndev/bytecoin / get

Function get

src/platform/DBsqlite3.cpp:213–221  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

211}
212
213static std::pair<const unsigned char *, size_t> get(const sqlite::Stmt &stmt, const std::string &key) {
214 sqlite3_reset(stmt.handle);
215 stmt.bind_blob(1, key.data(), key.size());
216 if (!stmt.step())
217 return std::make_pair(nullptr, 0);
218 auto si = stmt.column_bytes(1);
219 auto da = stmt.column_blob(1);
220 return std::make_pair(da, si);
221}
222
223bool DBsqliteKV::get(const std::string &key, common::BinaryArray &value) const {
224 auto result = ::get(stmt_get, key);

Callers 5

getMethod · 0.70
WalletHDsqliteMethod · 0.50
loadMethod · 0.50
getMethod · 0.50
export_keysMethod · 0.50

Calls 6

bind_blobMethod · 0.80
stepMethod · 0.80
column_bytesMethod · 0.80
column_blobMethod · 0.80
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected