Closed fungs closed 1 year ago
In raw mode. Keys are ordered as rocksdb will order them (just ordered). If you are storing Python string / int / etc., each type of keys are group ordered.
However for other objects, since the keys are pickle serialized, the order is uncertain. There is no way to ensure for these keys since calling into Python for comparison would be too slow.
I do recommend using raw mode for better performance though.
Thanks. I assume you mean byte order and not insert (time) order.
Seems like it is nothing one should rely on.
Right. They are sorted like a treemap. Not like a queue.
If you need to iterate them according to insertion order. Just make a new column family to map (insert sequence no) -> (key). And then iterate over that column family and fetch the value using the keys.
Hi,
starting from Python 3.7, dict() objects guarantee insert order, much like collections.OrderedDict. Is there any order guarantee or possibilities for this library? I didn't find any statement in the docs.
Best