3 releases (breaking)
0.7.0 | Sep 17, 2021 |
---|---|
0.6.0 | Mar 13, 2021 |
0.5.0 | Jan 13, 2021 |
#2145 in Database interfaces
32 downloads per month
Used in robt
155KB
4K
SLoC
Persistent Ordered Map
This package implements LLRB, Left Leaning Red Black, tree a popular data structured, with following features:
- Self-balancing data structure.
- Each entry in OMap instance correspond to a {Key, Value} pair.
- Parametrised over
key-type
andvalue-type
. - CRUD operations, via set(), get(), remove() api.
- Full table scan, to iterate over all entries.
- Range scan, to iterate between a
low
andhigh
. - Reverse iteration.
- Uses ownership model and borrow semantics to ensure safety.
- Optimized for in-memory index.
- Read optimized.
Refer to rustdoc for details.
Note that, this project is a continuation of llrb-index which originally implemented an ephemeral OMap, which is now available here as ppom::OMap.
Useful links
- Wikipedia link on LLRB algorithm.
- Wikipedia link on persistent data structure.
- Discussion on the design choice over get() and range() API.
Contribution
- Simple workflow. Fork - Modify - Pull request.
- Before creating a PR,
- Run
make build
to confirm all versions of build is passing with 0 warnings and 0 errors. - Run
check.sh
with 0 warnings, 0 errors and all testcases passing. - Run
perf.sh
with 0 warnings, 0 errors and all testcases passing. - [Install][spellcheck] and run
cargo spellcheck
to remove common spelling mistakes.
- Run
- Developer certificate of origin is preferred.
Dependencies
~0.5–1MB
~18K SLoC