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

[Draft] Isolate range param lifetime from self in Transaction::scan #135

Open
ethe opened this issue Sep 5, 2024 · 0 comments
Open

[Draft] Isolate range param lifetime from self in Transaction::scan #135

ethe opened this issue Sep 5, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers XS - Tiny Fixing typos, adding or modifying comments, minor configuration changes.

Comments

@ethe
Copy link
Member

ethe commented Sep 5, 2024

Tonbo does not support this:

let mut scan = txn
    .scan((Bound::Included(&"Alice".into()), Bound::Excluded(&"Blob".into())))
    .await
    // tonbo supports pushing down projection
    .projection(vec![1])
    .take()
    .await
    .unwrap();

I think it because we define scan method like this:

fn scan<'scan>(
        &'scan self,
        range: (Bound<&'scan R::Key>, Bound<&'scan R::Key>),
    ) -> Scan<'scan, R, FP>

Modifying type declaration might be helpful to support it:

fn scan<'scan, 'range>(
        &'scan self,
        range: (Bound<&'range R::Key>, Bound<&'range R::Key>),
    ) -> Scan<'scan, 'range, R, FP>
@ethe ethe added enhancement New feature or request good first issue Good for newcomers XS - Tiny Fixing typos, adding or modifying comments, minor configuration changes. labels Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers XS - Tiny Fixing typos, adding or modifying comments, minor configuration changes.
Projects
None yet
Development

No branches or pull requests

1 participant