| 52 | } |
| 53 | |
| 54 | void LMDBReader::Close() { |
| 55 | if (mdb_env_ != nullptr) { |
| 56 | mdb_cursor_close(mdb_cursor_); |
| 57 | mdb_txn_abort(mdb_txn_); |
| 58 | mdb_dbi_close(mdb_env_, mdb_dbi_); |
| 59 | mdb_env_close(mdb_env_); |
| 60 | mdb_env_ = nullptr; |
| 61 | mdb_txn_ = nullptr; |
| 62 | mdb_cursor_ = nullptr; |
| 63 | } |
| 64 | } |
| 65 | |
| 66 | bool LMDBReader::Read(std::string* key, std::string* value) { |
| 67 | if (first_ != true) |
nothing calls this directly
no outgoing calls
no test coverage detected