You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am embarking on a rather large code cleanup of about 2000 C# projects, with both inline SQL as well as stored procs/functions etc.
I am aware I can use performance counters or extended events to analyse statements at runtime.
I intend to remove all deprecated feature calls and replace with supported mechanisms.
My thoughts are that this analysis could be done by this library, and instead of having to wait for syntax errors on removed syntax, have deprecated feature warnings whilst the feature is still 'live' but not advised to be used.
A trivial example:
select * from MyTable with (FORCESEEK INDEX(MyIndex))
This is deprecated
select * from MyTable with (FORCESEEK, INDEX(MyIndex))
This is supported (note the comma)
Do you currently have any identification mechanism that would show deprecated feature usage?
If not, would it make sense for the library to have this, or should it be implemented outside of this library?
I did try the two examples - both parsed to the same number of TSqlFragment objects and I couldn't see any difference on the table hint fragments.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am embarking on a rather large code cleanup of about 2000 C# projects, with both inline SQL as well as stored procs/functions etc.
I am aware I can use performance counters or extended events to analyse statements at runtime.
I intend to remove all deprecated feature calls and replace with supported mechanisms.
My thoughts are that this analysis could be done by this library, and instead of having to wait for syntax errors on removed syntax, have deprecated feature warnings whilst the feature is still 'live' but not advised to be used.
A trivial example:
select * from MyTable with (FORCESEEK INDEX(MyIndex))
This is deprecated
select * from MyTable with (FORCESEEK, INDEX(MyIndex))
This is supported (note the comma)
Do you currently have any identification mechanism that would show deprecated feature usage?
If not, would it make sense for the library to have this, or should it be implemented outside of this library?
I did try the two examples - both parsed to the same number of TSqlFragment objects and I couldn't see any difference on the table hint fragments.
Beta Was this translation helpful? Give feedback.
All reactions