SqlRuleExecutionContext SqlRuleExecutionContext SqlRuleExecutionContext Class


Defines the fields necessary for analysis, including the schema model and model element to analyze.

public sealed class SqlRuleExecutionContext
type SqlRuleExecutionContext = class
Public NotInheritable Class SqlRuleExecutionContext


ModelElement ModelElement ModelElement

The TSqlObject being analyzed.

RuleDescriptor RuleDescriptor RuleDescriptor

Describes the rule being executed, and can be used to access the

SchemaModel SchemaModel SchemaModel

The TSqlModel being analyzed.

ScriptFragment ScriptFragment ScriptFragment

Gets the script fragment which defines the element being analyzed, if this is available. May be null.

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 ModelElement/>. This ensures that when reporting SqlRuleProblems the most accurate source information can be included in the error messages.

Applies to