TSqlModelUtils Class
Updated: April 20, 2017
Provides utility methods for the public model APIs.
Assembly: Microsoft.SqlServer.Dac.Extensions (in Microsoft.SqlServer.Dac.Extensions.dll)
| Name | Description | |
|---|---|---|
![]() ![]() | CalculatePlatformCompatibility(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. |
![]() ![]() | TryGetFragmentForAnalysis(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. |
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

