Skip to content

Commit

Permalink
add iterator refresh interface
Browse files Browse the repository at this point in the history
  • Loading branch information
yangyazhou committed May 21, 2024
1 parent 3358abe commit f1626a0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions db/c.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2122,6 +2122,10 @@ unsigned char rocksdb_iter_valid(const rocksdb_iterator_t* iter) {
return iter->rep->Valid();
}

void rocksdb_iter_refresh(rocksdb_iterator_t* iter) {
iter->rep->Refresh();
}

void rocksdb_iter_seek_to_first(rocksdb_iterator_t* iter) {
iter->rep->SeekToFirst();
}
Expand Down
1 change: 1 addition & 0 deletions include/rocksdb/c.h
Original file line number Diff line number Diff line change
Expand Up @@ -738,6 +738,7 @@ extern ROCKSDB_LIBRARY_API void rocksdb_repair_db(
extern ROCKSDB_LIBRARY_API void rocksdb_iter_destroy(rocksdb_iterator_t*);
extern ROCKSDB_LIBRARY_API unsigned char rocksdb_iter_valid(
const rocksdb_iterator_t*);
extern ROCKSDB_LIBRARY_API void rocksdb_iter_refresh(rocksdb_iterator_t* iter);
extern ROCKSDB_LIBRARY_API void rocksdb_iter_seek_to_first(rocksdb_iterator_t*);
extern ROCKSDB_LIBRARY_API void rocksdb_iter_seek_to_last(rocksdb_iterator_t*);
extern ROCKSDB_LIBRARY_API void rocksdb_iter_seek(rocksdb_iterator_t*,
Expand Down

0 comments on commit f1626a0

Please sign in to comment.