| 334 | } |
| 335 | |
| 336 | bool CDBWrapper::ExistsImpl(std::span<const std::byte> key) const |
| 337 | { |
| 338 | leveldb::Slice slKey(CharCast(key.data()), key.size()); |
| 339 | |
| 340 | std::string strValue; |
| 341 | leveldb::Status status = DBContext().pdb->Get(DBContext().readoptions, slKey, &strValue); |
| 342 | if (!status.ok()) { |
| 343 | if (status.IsNotFound()) |
| 344 | return false; |
| 345 | LogError("LevelDB read failure: %s", status.ToString()); |
| 346 | HandleError(status); |
| 347 | } |
| 348 | return true; |
| 349 | } |
| 350 | |
| 351 | size_t CDBWrapper::EstimateSizeImpl(std::span<const std::byte> key1, std::span<const std::byte> key2) const |
| 352 | { |