mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
Add --celldb-direct-io and --celldb-preload-all (#993)
Co-authored-by: SpyCheese <mikle98@yandex.ru>
This commit is contained in:
parent
816dd9cf2d
commit
561f342639
8 changed files with 108 additions and 17 deletions
|
@ -19,6 +19,7 @@
|
|||
#pragma once
|
||||
#include "td/utils/Status.h"
|
||||
#include "td/utils/logging.h"
|
||||
#include <functional>
|
||||
namespace td {
|
||||
class KeyValueReader {
|
||||
public:
|
||||
|
@ -27,6 +28,9 @@ class KeyValueReader {
|
|||
|
||||
virtual Result<GetStatus> get(Slice key, std::string &value) = 0;
|
||||
virtual Result<size_t> count(Slice prefix) = 0;
|
||||
virtual Status for_each(std::function<Status(Slice, Slice)> f) {
|
||||
return Status::Error("for_each is not supported");
|
||||
}
|
||||
};
|
||||
|
||||
class PrefixedKeyValueReader : public KeyValueReader {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue