juji-io / datalevin

A simple, fast and versatile Datalog database
https://github.com/juji-io/datalevin
Eclipse Public License 1.0
1.07k stars 60 forks source link

Expose LMDB dupsort functionality #181

Closed huahaiy closed 3 months ago

huahaiy commented 1 year ago

LMDB dupsort allows storing a list of values to the same key, and this list of values are also sorted. This is a very useful feature. Basically, it is a two level B+tree, the first level is the keys, the second level is the lists.

Since the list values are keys in the second level B+tree, the same size limitation of LMDB keys (511 bytes) applies.

We are already using some dupsort functions internally, now we will add a set of function list-* functions to expose a complete set of list related functions to users.