ahrocksdb

A binding to RocksDB
IN THIS PACKAGE
Module Rocksdb . Iterator
type iterator
val create : t -> Options.Read_options.t -> ( iterator, error ) result
val seek : iterator -> string -> unit

seek iterator prefix will set the iterator t in seek mode, iterating on keys starting by prefix

val get : iterator -> (string * string) option

get iterator will get the current key value pair on iterator t. Calling it multiple time in a row with no change of position results in the same pair being returned

val next : iterator -> unit

next iterator will set the iterator to the next key in the range. pair on iterator t. Be mindful of the fact that you need to check if the iterator is still valid via is_valid, and that according to RocksDB documentation, in prefix mode, you should make sure that the key is indeed starting by your prefix as your ending condition while iterating, since after finishing the range, RocksDB might return the next range after it. See https://github.com/facebook/rocksdb/wiki/Prefix-Seek-API-Changes#transition-to-the-new-usage

val is_valid : iterator -> bool