indexes.js 555 B

12345678910111213141516171819202122
  1. 'use strict';
  2. const OperationBase = require('./operation').OperationBase;
  3. const indexInformation = require('./common_functions').indexInformation;
  4. class IndexesOperation extends OperationBase {
  5. constructor(collection, options) {
  6. super(options);
  7. this.collection = collection;
  8. }
  9. execute(callback) {
  10. const coll = this.collection;
  11. let options = this.options;
  12. options = Object.assign({}, { full: true }, options);
  13. indexInformation(coll.s.db, coll.collectionName, options, callback);
  14. }
  15. }
  16. module.exports = IndexesOperation;