mlib icon indicating copy to clipboard operation
mlib copied to clipboard

Missing explanation of how to access multiple values in a BPTREE_MULTI

Open BrianSipos opened this issue 9 months ago • 1 comments

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.

BrianSipos avatar May 10 '24 19:05 BrianSipos

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

P-p-H-d avatar May 11 '24 07:05 P-p-H-d

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

BrianSipos avatar May 15 '24 23:05 BrianSipos