Browse Source

added destroy to cursor

saintedlama/travis-non-legacy
Mathias Buus 11 years ago
parent
commit
9b508215e9
  1. 5
      index.js

5
index.js

@ -70,6 +70,11 @@ Cursor.prototype.sort = function() {
return this._config(DRIVER_CURSOR_PROTO.sort, arguments);
};
Cursor.prototype.destroy = function() {
this._apply(DRIVER_CURSOR_PROTO.close, arguments);
this.push(null);
};
Cursor.prototype._apply = function(fn, args) {
this._get(function(err, cursor) {
if (err) return getCallback(args)(err);

Loading…
Cancel
Save