Comments
2 comments
-
Official commentHi Luca,
Hope you are doing well today, thanks for reaching out to Redgate Support. I was able to reproduce this issue in my local environment and as such, I am going to raise a dev ticket to get this remediated in a future version of Prompt. That being said, if you toggle your active style and configure Global > Casing > Reserved Keywords > "Leave as is" that will function as a temporary workaround so Prompt does not change the casing of the ::get portion of the query.
Once I know more from development on the casing behavior, I will circle back here and let you know what shakes out.
-
Hi Luca,
Thanks for your patience on this while I finished working with development on the above reported behavior. At this time and after some back and forth with the developers, this behavior is being marked as won't fix as Redgate's Prompt Formatter would be unable to reliably format the .net CLR methods defined after the :: . The reasoning is because the :: prefix can be followed by any method name (basically any text) and cannot be explicitly formatted by the formatter as we cannot set any rules. Essentially it looks like we may not be able to reliably identify the .net CLR custom method defined in order to format it nominally with Prompts formatter.
Given that the Global > Casing > Reserved Keywords > "Leave as is" is sufficient to prevent formatting from occurring in these scenarios, development has opted to not add additional complexity behind the scenes.
Of course, let me know if you have any follow up concerns.
Add comment
Please sign in to leave a comment.
Hi,
I’d like to report what appears to be an issue with SQL Prompt formatting related to CLR method calls.
Problem
When formatting T-SQL code that calls a CLR method using the scope resolution operator (
::), SQL Prompt automatically uppercases the method name.Example:
After formatting, SQL Prompt changes:
to:
Why this is problematic
The identifier after
::is not a T-SQL keyword.It is a .NET CLR method, and therefore case-sensitive.
Changing
GettoGETis not just a stylistic modification — it can break code or cause mismatches in environments where CLR methods rely on case sensitivity.The formatter appears to treat the token after
::as a regular identifier or keyword, but in this context it represents a CLR member and should not have its casing altered.Environment