TSqlModelUtils Methods

 

Updated: April 20, 2017

Namespace:   Microsoft.SqlServer.Dac
Assembly:  Microsoft.SqlServer.Dac.Extensions (in Microsoft.SqlServer.Dac.Extensions.dll)

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticCalculatePlatformCompatibility(SqlServerVersion)

Maps from a SqlServerVersion to the TSqlPlatformCompatibility enum that matches it. The platform compatibility can be used to filter out extensions that don't support that platform, for instance code analysis rules.

System_CAPS_pubmethodSystem_CAPS_staticTryGetFragmentForAnalysis(TSqlObject^, TSqlFragment^%)

Tries to get the most suitable TSqlFragment for use during the rule analysis process. If the TSqlObject was originally built from a scripted source then the original source fragment will be returned. Otherwise a new AST will be generated from the tSqlObject. This ensures that when reporting SqlRuleProblems the most accurate source information can be included in the error messages. Note that a fragment will only be returned if this is supported for the TSqlObject. AST generation is only supported for top-level objects, with certain objects such as the DatabaseOptions and inline constraints not supporting AST generation even though they are top level types.

Return to top
Show: