Exemple #1
0
        internal override object Clone(SqlNodeCloneContext context)
        {
            if (context.NodeMapping.ContainsKey(this))
            {
                return(context.NodeMapping[this]);
            }

            SqlQueryExpression clone = new SqlQueryExpression(NodeType,
                                                              (ISqlQueryExpression)((SqlNode)left).Clone(context),
                                                              (ISqlQueryExpression)((SqlNode)right).Clone(context), all);

            context.NodeMapping[this] = clone;
            return(clone);
        }
        internal override object Clone(SqlNodeCloneContext context)
        {
            if (context.NodeMapping.ContainsKey(this))
            {
                return(context.NodeMapping[this]);
            }

            SqlSubQuery        clone;
            SqlSelect          select     = query as SqlSelect;
            SqlQueryExpression expression = query as SqlQueryExpression;

            if (select != null)
            {
                clone = new SqlSubQuery((SqlSelect)select.Clone(context));
            }
            else
            {
                clone = new SqlSubQuery((SqlQueryExpression)expression.Clone(context));
            }
            context.NodeMapping[this] = clone;
            return(clone);
        }