INNER CODE UNIT · JavaScript

rollbackSave

e-oj/Fawn · lib/roller.js:135

function rollbackSave(db, save, task) {
  var collection = getCollectionForStep(db, save);
  var _id = save.dataStore[0]._id;

  return collection.deleteOne({_id: _id}).then(function(){
    return updateState(task, save.index, ROLLED);
  });
}

/**
 * Rollback for remove or update step.
 *
 * @param db native db
 * @param step the update or remove step
 * @param task the task containing the step.
 *
 * @returns {Promise|*}
 */

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…