@ -289,6 +289,18 @@ Datastore.prototype._insert = function (newDoc, cb) {
});
});
};
};
/**
*Createanew_idthat'snotalreadyinuse
*/
Datastore.prototype.createNewId=function(){
vartentativeId=customUtils.uid(16);
// Try as many times as needed to get an unused _id. As explained in customUtils, the probability of this ever happening is extremely small, so this is O(1)