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

Method open

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

Source from the content-addressed store, hash-verified

50 ~wdb_sess(void) {}
51
52 bool open(void) {
53 int ret = db_.get_conn()->open_session(db_.get_conn(),
54 NULL, NULL, &session_);
55 if (ret != 0) {
56 printf("open session failed, ret=%d\r\n", ret);
57 return false;
58 }
59
60 ret = session_->create(session_, "table:access",
61 "key_format=S, value_format=S");
62 if (ret != 0) {
63 printf("create session failed, ret=%d\r\n", ret);
64 return false;
65 }
66
67 ret = session_->open_cursor(session_, "table:access",
68 NULL, NULL, &cursor_);
69 if (ret != 0) {
70 printf("create table failed, ret=%d\r\n", ret);
71 return false;
72 }
73 return true;
74 }
75
76 bool add(const char* key, const char* value) {
77 assert(cursor_);

Callers

nothing calls this directly

Calls 2

get_connMethod · 0.45
createMethod · 0.45

Tested by

no test coverage detected