function Collection(name, conn, opts) {
  if (opts === void 0) {
    opts = {};
  }

  this.opts = opts;
  this.name = name;
  this.collectionName = name;
  this.conn = conn;
  this.queue = [];
  this.buffer = !conn?._hasOpened;
  this.emitter = new EventEmitter();

  if (STATES.connected === this.conn.readyState) {
    this.onOpen();
  }
}
Abstract Collection constructor

This is the base class that drivers inherit from and implement.

@param {String} name name of the collection
@param {Connection} conn A MongooseConnection instance
@param {Object} [opts] optional collection options
@api public