Example #1
0
        public void Traverse(IVisitor visitor)
        {
            if (visitor == null)
            {
                throw new ArgumentNullException("visitor");
            }

            if (m_table == null)
            {
                throw new InvalidOperationException("INSERT must have target table.");
            }

            visitor.PerformBefore(this);
            m_table.Traverse(visitor);

            visitor.PerformOnNames(this);
            if (m_columnNames != null)
            {
                m_columnNames.Traverse(visitor);
            }

            if (m_columnValues == null)
            {
                throw new InvalidOperationException("INSERT must have column values.");
            }

            visitor.PerformOnValues(this);
            m_columnValues.Traverse(visitor);

            visitor.PerformAfter(this);
        }
Example #2
0
        public void Traverse(IVisitor visitor)
        {
            if (visitor == null)
            {
                throw new ArgumentNullException("visitor");
            }

            visitor.PerformBefore(this);

            if (m_star)
            {
                if (m_expressionArguments != null)
                {
                    throw new InvalidOperationException(
                              "Wildcard argument cannot be combined with expression.");
                }

                Wildcard.Value.Traverse(visitor);
            }

            if (m_expressionArguments != null)
            {
                m_expressionArguments.Traverse(visitor);
            }

            visitor.PerformAfter(this);
        }
Example #3
0
        public void Traverse(IVisitor visitor)
        {
            if (visitor == null)
            {
                throw new ArgumentNullException("visitor");
            }

            visitor.PerformBefore(this);
            m_expression.Traverse(visitor);
            visitor.PerformAfter(this);

            if (m_next != null)
            {
                m_next.Traverse(visitor);
            }
        }
Example #4
0
        public void Traverse(IVisitor visitor)
        {
            if (visitor == null)
            {
                throw new ArgumentNullException("visitor");
            }

            visitor.PerformBefore(this);

            if (m_expression == null)
            {
                throw new InvalidOperationException("GROUP BY must have expression.");
            }

            m_expression.Traverse(visitor);

            visitor.PerformOnHaving(this);
            if (m_having != null)
            {
                m_having.Traverse(visitor);
            }

            visitor.PerformAfter(this);
        }