You're viewing a comment by Ustun and its responses.

December 16, 2011, 20:16

I have a question about the following:

db.create();
/* populate design documents */

Does this mean the following will work? It shouldn't, right?

db.create();
db.save('vader', {
    name: 'darth', force: 'dark'
}, function (err, res) {
    // Handle response
});

Rather, we should be writing, is that correct?

db.create(function (err) {
  if (!err) { 
    db.save('vader', {
      name: 'darth', force: 'dark'
    }, function (err, res) {
    // Handle response
  });
});

Comment Responses

December 18, 2011, 14:07

Sure, the 2nd is right.

Reply To This Comment

(why do I need your e-mail?)

(Your twitter name, if you have one. (I'm @pkrumins, btw.))

Type first 3 letters of your name: (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.