-
Notifications
You must be signed in to change notification settings - Fork 54
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
Adding suppport for reverse iteration #109
Comments
Taking this up |
This is what I am thinkging, please let me know if this is okay or feel free to mention changes. Api design -
This can be passed to
and Also to
|
Is it better to have a builder pattern here? Because I think iteration is much more common than reverse iteration, we could keep: pub async fn scan<'scan>(
&'scan self,
range: (Bound<&'scan R::Key>, Bound<&'scan R::Key>),
) -> Scan<'scan, R, FP> then we add let mut scan = txn
.scan((Bound::Included(&name), Bound::Excluded(&upper)))
.await
.reverse()
.take()
.await
.unwrap(); In this way, if users do not explicitly declare reverse iterating, Tonbo could use iterating as default. |
Aligned. |
These should all implement reverse |
In current,
Transaction::scan
andDB::scan
only supports ascending order, it should be better to support reverse order iteration. This includes two steps tasks:The text was updated successfully, but these errors were encountered: