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

Method Write

src/leveldb/db/db_test.cc:2062–2074  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2060 delete reinterpret_cast<const ModelSnapshot*>(snapshot);
2061 }
2062 Status Write(const WriteOptions& options, WriteBatch* batch) override {
2063 class Handler : public WriteBatch::Handler {
2064 public:
2065 KVMap* map_;
2066 void Put(const Slice& key, const Slice& value) override {
2067 (*map_)[key.ToString()] = value.ToString();
2068 }
2069 void Delete(const Slice& key) override { map_->erase(key.ToString()); }
2070 };
2071 Handler handler;
2072 handler.map_ = &map_;
2073 return batch->Iterate(&handler);
2074 }
2075
2076 bool GetProperty(const Slice& property, std::string* value) override {
2077 return false;

Callers 1

TESTFunction · 0.45

Calls 1

IterateMethod · 0.45

Tested by

no test coverage detected