"use strict";

/********************
 * keyValueAccess.js
 *
 * demonstration of CRUD operations against CouchDB
 * using pouchDB
 */


var PouchDB = require('pouchdb'),
  uuid = require('node-uuid');

var db = new PouchDB('http://localhost:5984/dataaccess');

exports.createDocument = function createNewDocument(documentValues) {
  return db.post(documentValues)
    .then((result) => {
      console.log('I created a document!');
      return result;
    });
};

exports.createDocumentWithId = function createDocumentWithId(id, documentValues) {

};

var getDocumentById = exports.getDocumentById = function getDocumentById(id) {


};

exports.updateDocument = function updateDocument(id, newValues) {



}



exports.deleteDocumentById = function deleteDocumentById(id) {

};

@@ -537,24 +537,142 @@
 ntValues) %7B%0A
+  return db.get(id)%0A    .then((result) =%3E %7B%0A      console.log('I retrieved a document!');%0A      return result;%0A    %7D);
 %0A%7D;%0A%0Avar get

Implement createDocumentWithId