Request: allow option to return the whole document after calling insert() #211

Closed
tciuro opened this Issue Jun 24, 2014 · 1 comment

Comments

Projects
None yet
2 participants

tciuro commented Jun 24, 2014

Hello,

It would be great if the insert() function had an option that returned the whole document upon creation. Oftentimes, the client app requires the whole document (i.e. caching) and the workaround right now is to perform another call.

Thanks.

Owner

dscape commented Aug 27, 2014

But isn't the object within the scope of your closure?

var doc = {foo: true}

db.insert(doc, function () {
  console.log(doc);
}

Also, the rev and id are returned in the callback correct? Please reopen if you need some extra help, but provide a code sample

dscape closed this Aug 27, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment