Skip to content

Commit

Permalink
get
Browse files Browse the repository at this point in the history
  • Loading branch information
yyy53449599 committed Oct 28, 2024
1 parent f83b56f commit ab7d89e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
3 changes: 3 additions & 0 deletions db/db_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <string>
#include <vector>
#include <iostream>

#include "db/builder.h"
#include "db/db_iter.h"
#include "db/dbformat.h"
Expand All @@ -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"
Expand Down
6 changes: 2 additions & 4 deletions db/db_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 1 addition & 2 deletions include/leveldb/db.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit ab7d89e

Please sign in to comment.