execSql(request) {
    try {
      request.validateParameters();
    } catch (error) {
      request.error = error;
      process.nextTick(() => {
        this.debug.log(error.message);
        request.callback(error);
      });
      return;
    }

    const parameters = [];
    parameters.push({
      type: _dataType.TYPES.NVarChar,
      name: 'statement',
      value: request.sqlTextOrProcedure,
      output: false,
      length: undefined,
      precision: undefined,
      scale: undefined
    });

    if (request.parameters.length) {
      parameters.push({
        type: _dataType.TYPES.NVarChar,
        name: 'params',
        value: request.makeParamsParameter(request.parameters),
        output: false,
        length: undefined,
        precision: undefined,
        scale: undefined
      });
      parameters.push(...request.parameters);
    }

    this.makeRequest(request, _packet.TYPE.RPC_REQUEST, new _rpcrequestPayload.default('sp_executesql', parameters, this.currentTransactionDescriptor(), this.config.options));
  }
/**
   *  Execute the SQL represented by [[Request]].
   *
   * As `sp_executesql` is used to execute the SQL, if the same SQL is executed multiples times
   * using this function, the SQL Server query optimizer is likely to reuse the execution plan it generates
   * for the first execution. This may also result in SQL server treating the request like a stored procedure
   * which can result in the [[Event_doneInProc]] or [[Event_doneProc]] events being emitted instead of the
   * [[Event_done]] event you might expect. Using [[execSqlBatch]] will prevent this from occurring but may have a negative performance impact.
   *
   * Beware of the way that scoping rules apply, and how they may [affect local temp tables](http://weblogs.sqlteam.com/mladenp/archive/2006/11/03/17197.aspx)
   * If you're running in to scoping issues, then [[execSqlBatch]] may be a better choice.
   * See also [issue #24](https://github.com/pekim/tedious/issues/24)
   *
   * @param request A [[Request]] object representing the request.
   */
Execute the SQL represented by [[Request]].
As `sp_executesql` is used to execute the SQL, if the same SQL is executed multiples times
using this function, the SQL Server query optimizer is likely to reuse the execution plan it generates
for the first execution. This may also result in SQL server treating the request like a stored procedure
which can result in the [[Event_doneInProc]] or [[Event_doneProc]] events being emitted instead of the
[[Event_done]] event you might expect. Using [[execSqlBatch]] will prevent this from occurring but may have a negative performance impact.

Beware of the way that scoping rules apply, and how they may [affect local temp tables]
If you're running in to scoping issues, then [[execSqlBatch]] may be a better choice.
See also [issue #24]

@param request A [[Request]] object representing the request.
Execute the SQL represented by [[ Request ]] . As ` sp_executesql ` is used to execute the SQL if the same SQL is executed multiples times using this function the SQL Server query optimizer is likely to reuse the execution plan it generates for the first execution . This may also result in SQL server treating the request like a stored procedure which can result in the [[ Event_doneInProc ]] or [[ Event_doneProc ]] events being emitted instead of the [[ Event_done ]] event you might expect . Using [[ execSqlBatch ]] will prevent this from occurring but may have a negative performance impact . Beware of the way that scoping rules apply and how they may [ affect local temp tables ] If you ' re running in to scoping issues then [[ execSqlBatch ]] may be a better choice . See also [ issue #24 ] @param request A [[ Request ]] object representing the request .
execSql(request) {
    try {
      request.validateParameters();
    } catch (error) {
      request.error = error;
      process.nextTick(() => {
        this.debug.log(error.message);
        request.callback(error);
      });
      return;
    }
    const parameters = [];
    parameters.push({
      type: _dataType.TYPES.NVarChar,
      name: 'statement',
      value: request.sqlTextOrProcedure,
      output: false,
      length: undefined,
      precision: undefined,
      scale: undefined
    });
    if (request.parameters.length) {
      parameters.push({
        type: _dataType.TYPES.NVarChar,
        name: 'params',
        value: request.makeParamsParameter(request.parameters),
        output: false,
        length: undefined,
        precision: undefined,
        scale: undefined
      });
      parameters.push(...request.parameters);
    }
    this.makeRequest(request, _packet.TYPE.RPC_REQUEST, new _rpcrequestPayload.default('sp_executesql', parameters, this.currentTransactionDescriptor(), this.config.options));
  }
execSql ( request ) { try { request . validateParameters ( ) ; } catch ( error ) { request . error = error ; process . nextTick ( ( ) => { this . debug . log ( error . message ) ; request . callback ( error ) ; } ) ; return ; } const parameters = [ ] ; parameters . push ( { type : _dataType . TYPES . NVarChar , name : 'statement' , value : request . sqlTextOrProcedure , output : false , length : undefined , precision : undefined , scale : undefined } ) ; if ( request . parameters . length ) { parameters . push ( { type : _dataType . TYPES . NVarChar , name : 'params' , value : request . makeParamsParameter ( request . parameters ) , output : false , length : undefined , precision : undefined , scale : undefined } ) ; parameters . push ( ... request . parameters ) ; } this . makeRequest ( request , _packet . TYPE . RPC_REQUEST , new _rpcrequestPayload . default ( 'sp_executesql' , parameters , this . currentTransactionDescriptor ( ) , this . config . options ) ) ; }
Execute the SQL represented by [[Request]].
Execute the SQL represented by [[ Request ]] .