nlfiedler / mokuroku

Secondary indices for RocksDB in Rust.
https://crates.io/crates/mokuroku
Apache License 2.0
39 stars 4 forks source link

Support some form of "reduce" operation. #3

Open nlfiedler opened 5 years ago

nlfiedler commented 5 years ago

This library has the "map" concept from CouchDB/PouchDB, but it lacks the corresponding "reduce" that is part of the "map/reduce" paradigm. It is not a critical feature, but it is sometimes useful. In particular, a way to "count" or "sum" the outputs of the map function seems the most common use case.

nlfiedler commented 5 years ago

Added count_by_key() and count_all_keys() which does a query that returns results similar to what a _count CouchDB reducer would produce.