MCPcopy Create free account
hub / github.com/acl-dev/acl / get

Method get

lib_acl_cpp/samples/benchmark/wiredtiger/main.cpp:89–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87 }
88
89 bool get(const char* key, acl::string& value) {
90 assert(cursor_);
91 cursor_->set_key(cursor_, key);
92 int ret = cursor_->search(cursor_);
93 if (ret != 0) {
94 printf("search %s failed, ret=%d\r\n", key, ret);
95 return false;
96 }
97
98 const char* v;
99 ret = cursor_->get_value(cursor_, &v);
100 if (ret != 0) {
101 printf("get_value %s failed, ret=%d\r\n", key, ret);
102 return false;
103 }
104
105 value = v;
106 cursor_->reset(cursor_);
107 return true;
108 }
109
110 bool del(const char* key) {
111 assert(cursor_);

Callers 1

getMethod · 0.45

Calls 4

searchMethod · 0.80
set_keyMethod · 0.45
get_valueMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected