chickadee » level » db-pairs

db-pairs db #!key start end limit reverse fillcacheprocedure

Allows forward and backward iteration over the keys in alphabetical order. Returns a lazy sequence of all key/value pairs from start to end (up to limit). This uses the lazy-seq egg.

  • start - the key to start from (need not actually exist), if omitted starts from the first key in the database
  • end - the key to end on (need not actually exist), if omitted ends on the last key in the database
  • limit - stops after limit results have been returned
  • reverse - iterates backwards through the keys (reverse iteration may be somewhat slower than forward iteration)
  • fillcache - whether to fill leveldb's read cache when reading (turned off by default so the bulk read does not replace most of the cached contents)