async _overwrite (object, { collection, options } = {}) {
      if (!object) throw new IllegalArgumentError({ info: { object } })
      object._id = object._id || uuid()

      await this._tryDbOp(async () => await this._getCollection(collection).replaceOne(
        { _id: object._id },
        object,
        options
      ))

      return object
    }
/**
     * Replaces an existing document entirely; this is not a partial update.
     *
     * @private
     */
Replaces an existing document entirely; this is not a partial update.
@private
Replaces an existing document entirely ; this is not a partial update . @private
async _overwrite (object, { collection, options } = {}) {
      if (!object) throw new IllegalArgumentError({ info: { object } })
      object._id = object._id || uuid()
      await this._tryDbOp(async () => await this._getCollection(collection).replaceOne(
        { _id: object._id },
        object,
        options
      ))
      return object
    }
async _overwrite ( object , { collection , options } = { } ) { if ( ! object ) throw new IllegalArgumentError ( { info : { object } } ) object . _id = object . _id || uuid ( ) await this . _tryDbOp ( async ( ) => await this . _getCollection ( collection ) . replaceOne ( { _id : object . _id } , object , options ) ) return object }
Replaces an existing document entirely; this is not a partial update.
Replaces an existing document entirely ; this is not a partial update .