code: function sendCancelStatement(statementContext, statement, callback)
  {
    var url;
    var json;
  
    // use different rest endpoints based on whether the statement id is available
    if (statementContext.statementId)
    {
      url = '/queries/' + statementContext.statementId + '/abort-request';
    }
    else
    {
      url  = '/queries/v1/abort-request';
      json =
      {
        requestId: statementContext.requestId
      };
    }
  
    // issue a request to cancel the statement
    statementContext.services.sf.request(
    {
      method   : 'POST',
      url      : url,
      json     : json,
      callback : function(err)
      {
        // if a callback was specified, invoke it
        if (Util.isFunction(callback))
        {
          callback(Errors.externalize(err), statement);
        }
      }
    });
  }
docs: Issues a request to cancel a statement.
  
  @param {Object} statementContext
  @param {Object} statement
  @param {Function} callback