lib/services/sf.js
function buildLoginUrl(connectionConfig)
{
  var queryParams =
  [
    { name: 'warehouse',    value: connectionConfig.getWarehouse() },
    { name: 'databaseName', value: connectionConfig.getDatabase() },
    { name: 'schemaName',   value: connectionConfig.getSchema() },
    { name: 'roleName',     value: connectionConfig.getRole() }
  ];

  var queryStringObject = {};
  for (var index = 0, length = queryParams.length; index < length; index++)
  {
    var queryParam = queryParams[index];
    if (Util.string.isNotNullOrEmpty(queryParam.value))
    {
      queryStringObject[queryParam.name] = queryParam.value;
    }
  }

  return Url.format(
  {
    pathname : '/session/v1/login-request',
    search   : QueryString.stringify(queryStringObject)
  });
}
function buildLoginUrl(connectionConfig)
{
  var queryParams =
  [
    { name: 'warehouse',    value: connectionConfig.getWarehouse() },
    { name: 'databaseName', value: connectionConfig.getDatabase() },
    { name: 'schemaName',   value: connectionConfig.getSchema() },
    { name: 'roleName',     value: connectionConfig.getRole() }
  ];

  var queryStringObject = {};
  for (var index = 0, length = queryParams.length; index < length; index++)
  {
    var queryParam = queryParams[index];
    if (Util.string.isNotNullOrEmpty(queryParam.value))
    {
      queryStringObject[queryParam.name] = queryParam.value;
    }
  }

  return Url.format(
  {
    pathname : '/session/v1/login-request',
    search   : QueryString.stringify(queryStringObject)
  });
}
function buildLoginUrl ( connectionConfig ) { var queryParams = [ { name : 'warehouse' , value : connectionConfig . getWarehouse ( ) } , { name : 'databaseName' , value : connectionConfig . getDatabase ( ) } , { name : 'schemaName' , value : connectionConfig . getSchema ( ) } , { name : 'roleName' , value : connectionConfig . getRole ( ) } ] ; var queryStringObject = { } ; for ( var index = 0 , length = queryParams . length ; index < length ; index ++ ) { var queryParam = queryParams [ index ] ; if ( Util . string . isNotNullOrEmpty ( queryParam . value ) ) { queryStringObject [ queryParam . name ] = queryParam . value ; } } return Url . format ( { pathname : '/session/v1/login-request' , search : QueryString . stringify ( queryStringObject ) } ) ; }
Builds the url for a login request.

@param connectionConfig

@returns {*}
Builds the url for a login request .