You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like the Save function keeps track of the actual date and time of a save and that is used when the document is merged versus the sequency or _rev? Is that correct?
functionsave(db,doc){delete(doc._rev);// delete any revision numbers copied from previous docsdoc.$createdAt=(newDate()).toJSON();if(doc.$id){// update?// this format guarantees the docs will be retrieved in order they were createddoc._id=doc.$id+'_'+doc.$createdAt;returndb.put(doc).then(function(response){response.$id=doc.$id;returnresponse;})["catch"](/* istanbul ignore next */function(err){// It appears there is a bug in pouch that causes a doc conflict even though we are creating a// new docif(err.status!==409){throwerr;}});}else{// newreturndb.post(doc).then(function(response){response.$id=response.id;returnresponse;});}}
The text was updated successfully, but these errors were encountered:
It looks like the Save function keeps track of the actual date and time of a save and that is used when the document is merged versus the sequency or _rev? Is that correct?
The text was updated successfully, but these errors were encountered: