CouchDB database adapter agnostic utility functions