couchDB insert function