Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce ReadOptions::set_iterate_range and PrefixRange #656

merged 3 commits into from Jul 20, 2022


Copy link

@mina86 mina86 commented Jul 16, 2022

Firstly, introduce ReadOptions::set_iterate_range method. It accepts
range as an argument and in this way in an idiomatic way covers use
cases of set_iterate_lower_bound and set_iterate_upper_bound methods.
It also allows bounds to be cleared after they were initially set.

Secondly, and more crucially, introduce PrefixRange which can be used
as an argument to set_iterate_range. When used, it sets the lower and
upper bounds so that they cover keys with given prefix only. This
allows for easy implementation of manual prefix iteration.

Copy link
Contributor Author

mina86 commented Jul 16, 2022

This could deprecate set_iterate_lower_bound and set_iterate_upper_bound methods.

@mina86 mina86 force-pushed the r branch 3 times, most recently from b6b4ca9 to 6f2fec8 Compare Jul 16, 2022
look like ancient rustc do not implement From<[u8; N]> for Vec<u8>.
Copy link

@stanislav-tkach stanislav-tkach left a comment

Thank you for the pull request, especially for the effort with documentation!

@stanislav-tkach stanislav-tkach requested a review from aleksuss Jul 19, 2022
@aleksuss aleksuss merged commit 78dba21 into rust-rocksdb:master Jul 20, 2022
6 checks passed
@mina86 mina86 deleted the r branch Jul 20, 2022
vldm pushed a commit to velas/rust-rocksdb that referenced this pull request Sep 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

3 participants