diff --git a/tddb/td/db/SeqKeyValue.h b/tddb/td/db/SeqKeyValue.h index f64ff0889..5d53a614b 100644 --- a/tddb/td/db/SeqKeyValue.h +++ b/tddb/td/db/SeqKeyValue.h @@ -62,9 +62,6 @@ class SeqKeyValue { return map_.size(); } - void reset_seq_no() { - current_id_ = 0; - } std::unordered_map get_all() const { return map_; } diff --git a/tddb/td/db/SqliteKeyValue.cpp b/tddb/td/db/SqliteKeyValue.cpp index 6887bc81a..aaafe0ed1 100644 --- a/tddb/td/db/SqliteKeyValue.cpp +++ b/tddb/td/db/SqliteKeyValue.cpp @@ -50,7 +50,7 @@ Status SqliteKeyValue::drop() { return result; } -SqliteKeyValue::SeqNo SqliteKeyValue::set(Slice key, Slice value) { +void SqliteKeyValue::set(Slice key, Slice value) { set_stmt_.bind_blob(1, key).ensure(); set_stmt_.bind_blob(2, value).ensure(); auto status = set_stmt_.step(); @@ -59,7 +59,6 @@ SqliteKeyValue::SeqNo SqliteKeyValue::set(Slice key, Slice value) { } // set_stmt_.step().ensure(); set_stmt_.reset(); - return 0; } string SqliteKeyValue::get(Slice key) { @@ -76,11 +75,10 @@ string SqliteKeyValue::get(Slice key) { return data; } -SqliteKeyValue::SeqNo SqliteKeyValue::erase(Slice key) { +void SqliteKeyValue::erase(Slice key) { erase_stmt_.bind_blob(1, key).ensure(); erase_stmt_.step().ensure(); erase_stmt_.reset(); - return 0; } void SqliteKeyValue::erase_by_prefix(Slice prefix) { diff --git a/tddb/td/db/SqliteKeyValue.h b/tddb/td/db/SqliteKeyValue.h index 1d920aaa0..026d2b402 100644 --- a/tddb/td/db/SqliteKeyValue.h +++ b/tddb/td/db/SqliteKeyValue.h @@ -27,8 +27,6 @@ class SqliteKeyValue { return connection.exec(PSLICE() << "CREATE TABLE IF NOT EXISTS " << table_name << " (k BLOB PRIMARY KEY, v BLOB)"); } - using SeqNo = uint64; - bool empty() const { return db_.empty(); } @@ -41,11 +39,11 @@ class SqliteKeyValue { Status drop(); - SeqNo set(Slice key, Slice value); + void set(Slice key, Slice value); string get(Slice key); - SeqNo erase(Slice key); + void erase(Slice key); Status begin_read_transaction() TD_WARN_UNUSED_RESULT { return db_.begin_read_transaction();