SQL-Server-First-Responder-Kit icon indicating copy to clipboard operation
SQL-Server-First-Responder-Kit copied to clipboard

sp_BlitzQueryStore Style Edits

Open ReeceGoding opened this issue 1 year ago • 0 comments

I decided to clean up anything that bothered me in sp_BlitzQueryStore before beginning any serious work on it. These are largely style changes. Summary:

  1. Minor edits to some comments, mostly typo corrections and edits for consistency with surrounding comments.
  2. Removed some extra spaces, e.g. double spaces in printed text.
  3. Moved repeated calls to SERVERPROPERTY in to variables. Some of these originally were NVARCHAR and others were VARCHAR. I am not sure if there is a good reason behind this, so I have gone with my the docs. ENGINEEDITION is an exception to this and has been stored as an INT.
  4. Ruthlessly made the commenting syntax consistent. The most common form in the original was /*Foo*/ so I've applied that everywhere other than the multi-line block comments. Previously, it has --Foo, -- Foo, /*foo*/, /* Foo */, and
/*
I am a single sentence on a single line. This comment block has no other lines of text.
*/
  1. Added comments for some temp tables that had none.
  2. Documented the undocumented @Version parameters in the @Help text.
  3. Switched SELECT TOP N to SELECT TOP (N) for consistency with other uses of TOP.

I expect that only point 3 has even the slightest chance of breaking anything. Those variables are mostly used for Azure checks, but I don't have an Azure box to test them on.

ReeceGoding avatar Mar 04 '24 17:03 ReeceGoding