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

Missing explanation of how to access multiple values in a BPTREE_MULTI #121

Closed
BrianSipos opened this issue May 10, 2024 · 2 comments
Closed

Comments

@BrianSipos
Copy link

There is an explanation for how to declare a BPTREE_DEF* separately from a BPTREE_MULTI_DEF* and how it affects the storage logic and key uniqueness, but I don't see a way to actually access multiple values under the same key except for iterating over all of the items in the tree (which would defeat the purpose of using a tree for fast lookup).

Is there a separate API for looking up a BPTREE iterator from a key, or some other way of accessing the multiple possible values within a BPTREE_MULTI? There may already be so, I just cant find any documentation or explanation of it.

@P-p-H-d
Copy link
Owner

P-p-H-d commented May 11, 2024

You can use the following API to iterate on the multiple values associated to a key:

  • name_it_from
  • name_it_while_p

(I have fixed the documentation of name_it_from which was incorrect).
See example

@BrianSipos
Copy link
Author

Thanks! I thought it was just the docs and not the interface.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants