You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
637 B

2 months ago
'use strict';
const Aspect = require('./operation').Aspect;
const defineAspects = require('./operation').defineAspects;
const DropIndexOperation = require('./drop_index');
const handleCallback = require('../utils').handleCallback;
class DropIndexesOperation extends DropIndexOperation {
constructor(collection, options) {
super(collection, '*', options);
}
execute(callback) {
super.execute(err => {
if (err) return handleCallback(callback, err, false);
handleCallback(callback, null, true);
});
}
}
defineAspects(DropIndexesOperation, Aspect.WRITE_OPERATION);
module.exports = DropIndexesOperation;