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

Method open_tbl

lib_acl_cpp/src/hsocket/hsclient.cpp:44–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42}
43
44bool hsclient::open_tbl(const char* dbn, const char* tbl,
45 const char* idx, const char* flds, bool auto_open /* = true */)
46{
47 string key(dbn);
48
49 key << '|' << tbl << '|' << idx << '|' << flds;
50 key.lower();
51
52 if (stream_.opened()) {
53 std::map<string, hstable*>::iterator it = tables_.find(key);
54 if (it != tables_.end()) {
55 tbl_curr_ = it->second;
56 return true;
57 }
58 }
59
60 if (!auto_open) {
61 error_ = HS_ERR_NOT_OPEN;
62 tbl_curr_ = NULL;
63 return false;
64 }
65 return open_tbl(dbn, tbl, idx, flds, key.c_str());
66}
67
68
69bool hsclient::open_tbl(const char* dbn, const char* tbl,

Callers 5

hs_insertFunction · 0.80
hs_findFunction · 0.80
hs_find2Function · 0.80
hs_updateFunction · 0.80
peekMethod · 0.80

Calls 12

acl_last_serrorFunction · 0.85
getsMethod · 0.80
parse_respondMethod · 0.80
hstableClass · 0.50
close_streamFunction · 0.50
openedMethod · 0.45
findMethod · 0.45
endMethod · 0.45
c_strMethod · 0.45
openMethod · 0.45
clearMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected