MCPcopy
hub / github.com/apache/pouchdb / transformForceOptionToNewEditsOption

Method transformForceOptionToNewEditsOption

lib/index-browser.js:1872–1886  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1870 }
1871
1872 function transformForceOptionToNewEditsOption() {
1873 var parts = doc._rev.split('-');
1874 var oldRevId = parts[1];
1875 var oldRevNum = parseInt(parts[0], 10);
1876
1877 var newRevNum = oldRevNum + 1;
1878 var newRevId = rev();
1879
1880 doc._revisions = {
1881 start: newRevNum,
1882 ids: [newRevId, oldRevId]
1883 };
1884 doc._rev = newRevNum + '-' + newRevId;
1885 opts.new_edits = false;
1886 }
1887 }).bind(this);
1888
1889 this.putAttachment = adapterFun('putAttachment', function (docId, attachmentId, rev$$1, blob, type) {

Callers

nothing calls this directly

Calls 1

revFunction · 0.70

Tested by

no test coverage detected