MCPcopy Create free account
hub / github.com/baidu/tera / SetScanner

Method SetScanner

src/sdk/tera_easy.cc:87–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85 }
86
87 bool SetScanner(const Key& start, const Key& end) {
88 if (scanner_ != NULL) {
89 delete scanner_;
90 }
91 tera::ErrorCode err;
92 tera::ScanDescriptor desc(start);
93 desc.SetEnd(end);
94
95 if ((scanner_ = table_->Scan(desc, &err)) == NULL) {
96 LOG(ERROR) << "fail to scan the table, reason:" << err.GetReason();
97 return false;
98 }
99 return true;
100 }
101
102 bool NextPair(KVPair* pair) {
103 if (scanner_ == NULL) {

Callers

nothing calls this directly

Calls 3

SetEndMethod · 0.45
ScanMethod · 0.45
GetReasonMethod · 0.45

Tested by

no test coverage detected