public override AstElement Clone(Dictionary <AstElement, AstElement> alreadyClonedElements) { JoinedTableReference result = new JoinedTableReference(); result.Left = (TableReference)_left.Clone(alreadyClonedElements); result.JoinType = _joinType; result.Right = (TableReference)_right.Clone(alreadyClonedElements); if (_condition != null) { result.Condition = (ExpressionNode)_condition.Clone(alreadyClonedElements); } return(result); }
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); }