-
Type: Improvement
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
8
-
Storage - Ra 2022-05-16
The range bounded cursor is intended to allow users to define a smaller key space for a cursor to operate over. Some example usages are shown below:
Search near with bounds: cursor->set_key(cursor, “A”) cursor->bound(cursor, “bound=lower”) cursor->set_key(cursor, “K”) cursor->bound(cursor, “bound=upper”) cursor->set_key(cursor, “J”) cursor->search_near(cursor) cursor->reset(cursor) Cursor traversal with bounds: cursor->set_key(cursor, “A”) cursor->bound(cursor, “bound=lower,inclusive=false”) cursor->next(cursor) Prefix search with bounds: cursor->set_key(cursor, “AAAA”) cursor->bound(cursor, “action=set,bound=lower”) cursor->set_key(cursor, “AAAA”) cursor->bound(cursor, “bound=upper”) cursor->search_near(cursor) Clearing bounds: cursor->bound(cursor, “action=clear”) cursor->bound(cursor, “action=clear,bound=lower”)
In this ticket we will define an implementation plan for the lower level implementation of the range bounded cursor. This includes things like:
- How to save the bounds, buffers held on the cursor?
- Detecting overlapping bounds.
- Handling bound traversal early exit.
Once the implementation is agreed upon, follow on tickets will be created to implement.