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 #ifndef ROCKSDB_LITE 7 8 #pragma once 9 10 #include <string> 11 12 #include "rocksdb/compaction_filter.h" 13 #include "rocksdb/slice.h" 14 15 namespace ROCKSDB_NAMESPACE { 16 17 class RemoveEmptyValueCompactionFilter : public CompactionFilter { 18 public: 19 const char* Name() const override; 20 bool Filter(int level, 21 const Slice& key, 22 const Slice& existing_value, 23 std::string* new_value, 24 bool* value_changed) const override; 25 }; 26 } // namespace ROCKSDB_NAMESPACE 27 #endif // !ROCKSDB_LITE 28