Bug 733987 - API to remove records from Sync's test HTTP server; r=rnewman

This commit is contained in:
Gregory Szorc 2012-03-08 13:50:09 -08:00
parent 71c8eb3018
commit 056a79a42d

View File

@ -295,6 +295,16 @@ ServerCollection.prototype = {
return this.insertWBO(new ServerWBO(id, payload, modified));
},
/**
* Removes an object entirely from the collection.
*
* @param id
* (string) ID to remove.
*/
remove: function remove(id) {
delete this._wbos[id];
},
_inResultSet: function(wbo, options) {
return wbo.payload
&& (!options.ids || (options.ids.indexOf(wbo.id) != -1))