Ejemplo n.º 1
0
        /// <summary>
        /// Convert the AST
        /// </summary>
        /// <param name="fragment">the sql code </param>
        /// <returns>the AST or null.</returns>
        public SqlNode Transport(ScriptDom.TSqlFragment fragment)
        {
            var astUtiltiy = (new OfaSchlupfer.MSSQLReflection.AST.AstUtility()
            {
                ParserVersion = this.ParserVersion, InitialQuotedIdentifiers = this.InitialQuotedIdentifiers
            });

            return(astUtiltiy.Transport(fragment));
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Whether to SKIP analysis for problems.
 /// </summary>
 public static bool IgnoreScriptFragment(Microsoft.SqlServer.TransactSql.ScriptDom.TSqlFragment fragment)
 {
     // external (generated)
     if (fragment is ProcedureStatementBody psb && psb.MethodSpecifier != null)
     {
         return(true);
     }
     return(false);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SqlNode"/> class.
 /// </summary>
 /// <param name="src">the source.</param>
 public SqlNode(ScriptDom.TSqlFragment src)
 {
     this.Analyse            = new OfaSchlupfer.MSSQLReflection.SqlCode.AnalyseNodeState(this);
     this.SourceTSqlFragment = src;
 }
Ejemplo n.º 4
0
 public Issue(ScriptDom.TSqlFragment fragment, IssueLevel level, string message)
 {
     _fragment = fragment;
     _level    = level;
     _message  = message;
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Convert the AST
 /// </summary>
 /// <param name="fragment">original AST</param>
 /// <returns>limited AST</returns>
 public SqlNode Transport(ScriptDom.TSqlFragment fragment)
 {
     return(Copier.Copy <SqlNode>(fragment));
 }