Commit 051ec8b3 authored by Connor's avatar Connor Committed by yiwu-arbug

Add missing `NewIterator` API (#28)

Override `Iterator* NewIterator(const ReadOptions& opts)`, otherwise, due to implicit casting, calling `db.NewIterator(TitanReadOptions::new())` will lead to a Rocksdb's iterator instead of Titan's.
Signed-off-by: 's avatarConnor1996 <zbk602423539@gmail.com>
parent 85cdc278
......@@ -82,6 +82,12 @@ class TitanDB : public StackableDB {
ColumnFamilyHandle* column_family) override {
return NewIterator(TitanReadOptions(opts), column_family);
}
Iterator* NewIterator(const ReadOptions& opts) override {
return NewIterator(TitanReadOptions(opts), DefaultColumnFamily());
}
virtual Iterator* NewIterator(const TitanReadOptions& opts) {
return NewIterator(opts, DefaultColumnFamily());
}
virtual Iterator* NewIterator(const TitanReadOptions& opts,
ColumnFamilyHandle* column_family) = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment