From ab7d89e0adce0470173d1a16b1c6f6bc372a2e6c Mon Sep 17 00:00:00 2001 From: Yumingyang Date: Mon, 28 Oct 2024 14:22:44 +0800 Subject: [PATCH] get --- db/db_impl.cc | 3 +++ db/db_impl.h | 6 ++---- include/leveldb/db.h | 3 +-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/db/db_impl.cc b/db/db_impl.cc index 5b8a862..f2d7c07 100755 --- a/db/db_impl.cc +++ b/db/db_impl.cc @@ -12,6 +12,7 @@ #include #include #include + #include "db/builder.h" #include "db/db_iter.h" #include "db/dbformat.h" @@ -22,11 +23,13 @@ #include "db/table_cache.h" #include "db/version_set.h" #include "db/write_batch_internal.h" + #include "leveldb/db.h" #include "leveldb/env.h" #include "leveldb/status.h" #include "leveldb/table.h" #include "leveldb/table_builder.h" + #include "port/port.h" #include "table/block.h" #include "table/merger.h" diff --git a/db/db_impl.h b/db/db_impl.h index cbb2ec6..4c39042 100755 --- a/db/db_impl.h +++ b/db/db_impl.h @@ -36,10 +36,8 @@ class DBImpl : public DB { ~DBImpl() override; // Implementations of the DB interface - Status Put(const WriteOptions&, const Slice& key, - const Slice& value) override; - Status Put(const WriteOptions& options, const Slice& key, const Slice& value, - uint64_t ttl) override; + Status Put(const WriteOptions&, const Slice& key,const Slice& value) override; + Status Put(const WriteOptions& options, const Slice& key, const Slice& value,uint64_t ttl) override; Status Delete(const WriteOptions&, const Slice& key) override; Status Write(const WriteOptions& options, WriteBatch* updates) override; Status Get(const ReadOptions& options, const Slice& key, diff --git a/include/leveldb/db.h b/include/leveldb/db.h index bf4eec5..4aaed3a 100755 --- a/include/leveldb/db.h +++ b/include/leveldb/db.h @@ -148,8 +148,7 @@ class LEVELDB_EXPORT DB { // ----------------------------For TTL----------------------------- // 为当前key设置ttl,过期后自动失效 - virtual Status Put(const WriteOptions& options, const Slice& key, - const Slice& value, uint64_t ttl) = 0; + virtual Status Put(const WriteOptions& options, const Slice& key,const Slice& value, uint64_t ttl) = 0; }; // Destroy the contents of the specified database.