package leveldb
Module LevelDB.IteratorSource
Iteration over bindings in a database.
Create a new iterator. Note that the iterator keeps a reference to the * DB, so the latter will not be GCed automatically as long as the iterator * is being used. Note also that if the DB is closed manually, the iterator * will be invalidated and further operations will fail. The returned * iterator needs not be closed manually, for it will be closed in its * finalizer.
Close the iterator. Further operations on it will fail. Note that * the iterator fill be closed automatically in its finalizer if this * function is not called manually.
seek it s off len seeks to first binding whose key is >= to the key * corresponding to the substring of s starting at off and of length * len. * Note that the contents of the key will be copied to the stack, so * exceedingly large keys could cause a stack overflow. *
fill_key it r places the key for the current binding in the string * referred to by r if it fits, otherwise it creates a new string and * updates the reference. *
Return the key part of the binding pointer to by the iterator. *
Return the value part of the binding pointer to by the iterator. *
iter f db applies f to all the bindings in the database/snapshot the * iterator belongs to, until f returns false, i.e. runs f key value * for all the bindings in lexicographic key order.
Like iter, but proceed in reverse lexicographic order.
iter_from f it start applies f key value for all the bindings after * start (inclusive) until it returns false.