Example #1
0
        public INode Clone()
        {
            AliasedItem aliasedItem = new AliasedItem(m_item.Clone());

            if (m_alias != null)
            {
                aliasedItem.Alias = (Identifier)(m_alias.Clone());
            }

            if (m_next != null)
            {
                aliasedItem.Add((AliasedItem)(m_next.Clone()));
            }

            return(aliasedItem);
        }
Example #2
0
        public INode Clone()
        {
            InsertStatement insertStatement = new InsertStatement();

            if (m_table != null)
            {
                insertStatement.Table = (DbObject)(m_table.Clone());
            }

            if (m_columnNames != null)
            {
                insertStatement.ColumnNames = (AliasedItem)(m_columnNames.Clone());
            }

            if (m_columnValues != null)
            {
                insertStatement.ColumnValues = (ExpressionItem)(m_columnValues.Clone());
            }

            return(insertStatement);
        }
Example #3
0
        public INode Clone()
        {
            QueryExpression queryExpression = new QueryExpression();

            queryExpression.Distinct = m_distinct;
            queryExpression.All      = m_all;
            queryExpression.SetLimit(m_limitFormat, m_limit);

            if (m_selectItems != null)
            {
                queryExpression.SelectItems = (AliasedItem)(m_selectItems.Clone());
            }

            if (m_from != null)
            {
                queryExpression.From = (AliasedItem)(m_from.Clone());
            }

            if (m_where != null)
            {
                queryExpression.Where = (IExpression)(m_where.Clone());
            }

            if (m_groupBy != null)
            {
                queryExpression.GroupBy = (GroupByClause)(m_groupBy.Clone());
            }

            if (m_orderBy != null)
            {
                queryExpression.OrderBy = (OrderExpression)(m_orderBy.Clone());
            }

            if (m_next != null)
            {
                queryExpression.Add((QueryExpression)(m_next.Clone()));
            }

            return(queryExpression);
        }