MCPcopy Create free account
hub / github.com/ElementsProject/elements / FinishImpl

Method FinishImpl

src/leveldb/table/table_test.cc:310–320  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

308 }
309 ~MemTableConstructor() override { memtable_->Unref(); }
310 Status FinishImpl(const Options& options, const KVMap& data) override {
311 memtable_->Unref();
312 memtable_ = new MemTable(internal_comparator_);
313 memtable_->Ref();
314 int seq = 1;
315 for (const auto& kvp : data) {
316 memtable_->Add(seq, kTypeValue, kvp.first, kvp.second);
317 seq++;
318 }
319 return Status::OK();
320 }
321 Iterator* NewIterator() const override {
322 return new KeyConvertingIterator(memtable_->NewIterator());
323 }

Callers

nothing calls this directly

Calls 4

OKFunction · 0.85
UnrefMethod · 0.45
RefMethod · 0.45
AddMethod · 0.45

Tested by

no test coverage detected