Exemple #1
0
        public void Visit(UpdateStatement updateStatement)
        {
            if (_innerVisitor != null)
            {
                updateStatement.Accept(_innerVisitor);
            }
            if (updateStatement.TopExpression != null)
            {
                updateStatement.TopExpression.Accept(this);
            }

            updateStatement.Target.Accept(this);

            if (updateStatement.SetColumnList != null)
            {
                foreach (var column in updateStatement.SetColumnList)
                {
                    column.Accept(this);
                }
            }

            if (updateStatement.FromList != null)
            {
                foreach (var from in updateStatement.FromList)
                {
                    from.Accept(this);
                }
            }

            if (updateStatement.WhereClause != null)
            {
                updateStatement.WhereClause.Accept(this);
            }
        }
Exemple #2
0
        public override void Visit(UpdateStatement node)
        {
            var whereClauseVisitor = new WhereClauseVisitor();

            node.Accept(whereClauseVisitor);

            if (!whereClauseVisitor.whereClausefound)
            {
                errorCallback(RULE_NAME, "Update " + RULE_TEXT, node.StartLine, GetColumnNumber(node));
            }
        }