| 336 | } |
| 337 | ~DBConstructor() override { delete db_; } |
| 338 | Status FinishImpl(const Options& options, const KVMap& data) override { |
| 339 | delete db_; |
| 340 | db_ = nullptr; |
| 341 | NewDB(); |
| 342 | for (const auto& kvp : data) { |
| 343 | WriteBatch batch; |
| 344 | batch.Put(kvp.first, kvp.second); |
| 345 | ASSERT_TRUE(db_->Write(WriteOptions(), &batch).ok()); |
| 346 | } |
| 347 | return Status::OK(); |
| 348 | } |
| 349 | Iterator* NewIterator() const override { |
| 350 | return db_->NewIterator(ReadOptions()); |
| 351 | } |
nothing calls this directly
no test coverage detected