First draft of CouchDB implementation (only metadata of first line is available; no query)