Quantcast
Channel: Rss Feed - SSMSBoost Add-in discussion board - Forum
Viewing all articles
Browse latest Browse all 823

Feedback on new Formatter (published in 2.13)

$
0
0
Hi SSMSBOOST- Team

The new formatter is a VERY GREAT approach, I'm getting a real fan!

A couple of things I found, using SSMSBOOST 3.1.6458.15317 (absolutely incomplete list, more to come):
  • The issue with the Tab using to do the indentation mentioned by Dani S. is still there.
  • "Case" formatting lacks:
    1. SpaceBeforeWhen
    2. SpaceBeforeElse

    I want to reach for bistable when/then/else statements:
    Code:
    
       ,CASE WHEN (ISNUMERIC(a.Number) = 0 AND a.[Group]='XYZ')
          THEN CONCAT(xyz_a.[Type], ' ' , bra_a.[Name])
          ELSE CONCAT(a.[Type], ' ' , a.[Name])
       END                   AS 'columnAliasX'
       ,CASE WHEN (ISNUMERIC(a.Number) = 0 AND a.[Group]='XY')
          THEN xyz_a.[Group] 
          ELSE a.[Group]
       END                   AS 'columnAliasY'

    or this look for multiple when/then
    Code:
    
       ,CASE 
          WHEN expression=result
             THEN output 
          WHEN expression=otherresult
             THEN otherOutput
             ELSE elseOutput
       END                   AS 'columnAliasY'

  • "Insert" - "Values" lacks of "SpaceBeforeOpeningBrace" to reach
    Code:
    
    INSERT INTO tablename
    	(column1, column2, column3)
    	VALUES 
       ('value1','value2','value3')

  • Option to keep a marked section untouched (for example a variable declaration section which fills a table variable with data.
    Example:
    Code:
    
    DECLARE @test TABLE (id int identity(1,1), keyCol varchar(50), valCol varchar(256))
    INSERT @test (keyCol, valCol)
       SELECT 'param1','Value1' UNION
       SELECT 'param2','Value2' UNION
       SELECT 'param3','Value3' 

    gets this way, after formatting, which makes no sense (IMHO) and needs unnecessary many lines
    Code:
    DECLARE @test TABLE ( id     int IDENTITY(1,1)
    		,               keyCol varchar(50)
    		,               valCol varchar(256)
    	)
    INSERT @test
    	(keyCol, valCol)
    	SELECT'param1'
    		,'Value1'
    	UNION
    	SELECT'param2'
    		,'Value2'
    	UNION
    	SELECT'param3'
    		,'Value3'

    Maybe somethin like
    Code:
    
    --#beginNoAutoFormat
    DECLARE @test TABLE (id int identity(1,1), keyCol varchar(50), valCol varchar(256))
    INSERT @test (keyCol, valCol)
       SELECT 'param1','Value1' UNION
       SELECT 'param2','Value2' UNION
       SELECT 'param3','Value3' 
    --#endNoAutoFormat


As mentioned above: more ideas to come, if desired.

Regards
Jimmy
Go to last post

Viewing all articles
Browse latest Browse all 823

Trending Articles