bulkOperate(bulk, collectionName, document, importSettings) {
    // insert
    if (importSettings.mode !== 'upsert') {
      return bulk.insert(document);
    }

    // upsert
    switch (collectionName) {
      default:
        return bulk.find({ _id: document._id }).upsert().replaceOne(document);
    }
  }
/**
   * process bulk operation
   * @param {object} bulk MongoDB Bulk instance
   * @param {string} collectionName collection name
   * @param {object} document
   * @param {ImportSettings} importSettings
   */
process bulk operation
@param {object} bulk MongoDB Bulk instance
@param {string} collectionName collection name
@param {object} document
@param {ImportSettings} importSettings
process bulk operation @param { object } bulk MongoDB Bulk instance @param { string } collectionName collection name @param { object } document @param { ImportSettings } importSettings
bulkOperate(bulk, collectionName, document, importSettings) {
    if (importSettings.mode !== 'upsert') {
      return bulk.insert(document);
    }
    switch (collectionName) {
      default:
        return bulk.find({ _id: document._id }).upsert().replaceOne(document);
    }
  }
bulkOperate ( bulk , collectionName , document , importSettings ) { if ( importSettings . mode !== 'upsert' ) { return bulk . insert ( document ) ; } switch ( collectionName ) { default : return bulk . find ( { _id : document . _id } ) . upsert ( ) . replaceOne ( document ) ; } }
process bulk operation
 @param {object} bulk MongoDB Bulk instance
 @param {string} collectionName collection name
 @param {object} document
 @param {ImportSettings} importSettings
process bulk operation @param { object } bulk MongoDB Bulk instance @param { string } collectionName collection name @param { object } document @param { ImportSettings } importSettings
// insert // upsert