public override AstElement Clone(Dictionary <AstElement, AstElement> alreadyClonedElements)
        {
            CommonTableExpressionQuery result = new CommonTableExpressionQuery();

            result.CommonTableExpressions = ArrayHelpers.CreateDeepCopyOfAstElementArray(_commonTableExpressions, alreadyClonedElements);
            result.Input = (QueryNode)_input.Clone(alreadyClonedElements);
            return(result);
        }
Example #2
0
        public override AstElement Clone(Dictionary <AstElement, AstElement> alreadyClonedElements)
        {
            SortedQuery result = new SortedQuery();

            result.Input          = (QueryNode)_input.Clone(alreadyClonedElements);
            result.OrderByColumns = ArrayHelpers.CreateDeepCopyOfAstElementArray(_orderByColumns, alreadyClonedElements);
            return(result);
        }
Example #3
0
        public override AstElement Clone(Dictionary <AstElement, AstElement> alreadyClonedElements)
        {
            ConstantScanAlgebraNode result = new ConstantScanAlgebraNode();

            result.StatisticsIterator = StatisticsIterator;
            result.OutputList         = ArrayHelpers.Clone(OutputList);
            result.DefinedValues      = ArrayHelpers.CreateDeepCopyOfAstElementArray(_definedValues, alreadyClonedElements);
            return(result);
        }
        public override AstElement Clone(Dictionary <AstElement, AstElement> alreadyClonedElements)
        {
            FunctionInvocationExpression result = new FunctionInvocationExpression();

            result.Name                = _name;
            result.NameSourceRange     = _nameSourceRange;
            result.HasAsteriskModifier = _hasAsteriskModifier;
            result.Arguments           = ArrayHelpers.CreateDeepCopyOfAstElementArray(_arguments, alreadyClonedElements);
            result.Function            = _function;
            return(result);
        }
Example #5
0
        public override AstElement Clone(Dictionary <AstElement, AstElement> alreadyClonedElements)
        {
            AggregateAlgebraNode result = new AggregateAlgebraNode();

            result.StatisticsIterator = StatisticsIterator;
            result.OutputList         = ArrayHelpers.Clone(OutputList);
            result.Input         = (AlgebraNode)Input.Clone(alreadyClonedElements);
            result.Groups        = ArrayHelpers.Clone(_groups);
            result.DefinedValues = ArrayHelpers.CreateDeepCopyOfAstElementArray(_definedValues, alreadyClonedElements);
            return(result);
        }
Example #6
0
        public override AstElement Clone(Dictionary <AstElement, AstElement> alreadyClonedElements)
        {
            SelectQuery result = new SelectQuery();

            result.IsDistinct = _isDistinct;

            if (_topClause != null)
            {
                result.TopClause = (TopClause)_topClause.Clone(alreadyClonedElements);
            }

            result.SelectColumns = ArrayHelpers.CreateDeepCopyOfAstElementArray(_selectColumns, alreadyClonedElements);

            if (_tableReferences != null)
            {
                result.TableReferences = (TableReference)_tableReferences.Clone(alreadyClonedElements);
            }

            if (_whereClause != null)
            {
                result.WhereClause = (ExpressionNode)_whereClause.Clone(alreadyClonedElements);
            }

            if (_groupByColumns != null)
            {
                result.GroupByColumns = ArrayHelpers.CreateDeepCopyOfAstElementArray(_groupByColumns, alreadyClonedElements);
            }

            if (_orderByColumns != null)
            {
                result.OrderByColumns = ArrayHelpers.CreateDeepCopyOfAstElementArray(_orderByColumns, alreadyClonedElements);
            }

            result.AggregateDependencies = ArrayHelpers.CreateDeepCopyOfAstElementArray(_aggregateDependencies, alreadyClonedElements);
            result.ColumnDependencies    = ArrayHelpers.Clone(_columnDependencies);

            return(result);
        }