]> git.proxmox.com Git - ceph.git/blob - ceph/src/rocksdb/utilities/merge_operators.h
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / rocksdb / utilities / merge_operators.h
1 // Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
2 // This source code is licensed under both the GPLv2 (found in the
3 // COPYING file in the root directory) and Apache 2.0 License
4 // (found in the LICENSE.Apache file in the root directory).
5 //
6 #pragma once
7 #include <stdio.h>
8
9 #include <memory>
10 #include <string>
11
12 #include "rocksdb/merge_operator.h"
13
14 namespace ROCKSDB_NAMESPACE {
15
16 class MergeOperators {
17 public:
18 static std::shared_ptr<MergeOperator> CreatePutOperator();
19 static std::shared_ptr<MergeOperator> CreateDeprecatedPutOperator();
20 static std::shared_ptr<MergeOperator> CreateUInt64AddOperator();
21 static std::shared_ptr<MergeOperator> CreateStringAppendOperator();
22 static std::shared_ptr<MergeOperator> CreateStringAppendOperator(
23 char delim_char);
24 static std::shared_ptr<MergeOperator> CreateStringAppendOperator(
25 const std::string& delim);
26 static std::shared_ptr<MergeOperator> CreateStringAppendTESTOperator();
27 static std::shared_ptr<MergeOperator> CreateMaxOperator();
28 static std::shared_ptr<MergeOperator> CreateBytesXOROperator();
29 static std::shared_ptr<MergeOperator> CreateSortOperator();
30
31 // Will return a different merge operator depending on the string.
32 static std::shared_ptr<MergeOperator> CreateFromStringId(
33 const std::string& name);
34 };
35
36 } // namespace ROCKSDB_NAMESPACE