May 2012
5 posts
1 tag
Incremental values with CouchDB update handlers
Unlike most relational databases CouchDB does not provide an auto-increment function.
Simply counting the number of documents (of a specific type) only works if you never delete any of them.
A simple solution is to use a separate document to keep track of the count and update it by calling an update handler. You can use a single document to maintain counts for different types of document.
Lets...
The theory of machinery is that it saves time, but Stanford himself noted of...
– From Rebecca Solnit’s River of Shadows (via viafrank)