withSessionNative(fn, sessionConfig = {}, transactionConfig = {}) {
    if (typeof fn !== 'function') {
      return Bluebird.reject(new Error('fn must be a function'));
    }

    const session = this.client.startSession(sessionConfig);

    return session.withTransaction(fn, transactionConfig)
      .then(results => {
        session.endSession();
        return Bluebird.resolve(results);
      })
      .catch(e => {
        session.endSession();
        return Bluebird.reject(e);
      });
  }
/**
   * Same as withSession but using the native implementation
   * @param fn
   * @param sessionConfig
   * @param transactionConfig
   * @returns {Promise<T | Promise>}
   */
Same as withSession but using the native implementation
@param fn
@param sessionConfig
@param transactionConfig
@returns {Promise}
Same as withSession but using the native implementation @param fn @param sessionConfig @param transactionConfig @returns { Promise }
withSessionNative(fn, sessionConfig = {}, transactionConfig = {}) {
    if (typeof fn !== 'function') {
      return Bluebird.reject(new Error('fn must be a function'));
    }
    const session = this.client.startSession(sessionConfig);
    return session.withTransaction(fn, transactionConfig)
      .then(results => {
        session.endSession();
        return Bluebird.resolve(results);
      })
      .catch(e => {
        session.endSession();
        return Bluebird.reject(e);
      });
  }
withSessionNative ( fn , sessionConfig = { } , transactionConfig = { } ) { if ( typeof fn !== 'function' ) { return Bluebird . reject ( new Error ( 'fn must be a function' ) ) ; } const session = this . client . startSession ( sessionConfig ) ; return session . withTransaction ( fn , transactionConfig ) . then ( results => { session . endSession ( ) ; return Bluebird . resolve ( results ) ; } ) . catch ( e => { session . endSession ( ) ; return Bluebird . reject ( e ) ; } ) ; }
Same as withSession but using the native implementation
 @param fn
 @param sessionConfig
 @param transactionConfig
 @returns {Promise<T | Promise>}
Same as withSession but using the native implementation @param fn @param sessionConfig @param transactionConfig @returns { Promise<T | Promise > }