public static PhysicalDataFlow.Destination Lower(this AstTransformation.AstDestinationNode astNode) { if (astNode.AsClassOnly) { return null; } PhysicalDataFlow.Destination physicalDestination = new Ssis2008Emitter.IR.DataFlow.Destination(); physicalDestination.AccessMode = astNode.AccessMode.ToString(); physicalDestination.CheckConstraints = astNode.CheckConstraints; AddConnection(astNode.Connection); physicalDestination.Connection = astNode.Connection.Name; physicalDestination.KeepIdentity = astNode.KeepIdentity; physicalDestination.KeepNulls = astNode.KeepNulls; physicalDestination.MaximumInsertCommitSize = astNode.MaximumInsertCommitSize; physicalDestination.Name = astNode.Name; physicalDestination.RowsPerBatch = astNode.RowsPerBatch; physicalDestination.Table = astNode.TableName; physicalDestination.TableLock = astNode.TableLock; physicalDestination.UseStaging = astNode.UseStaging; foreach (AstTransformation.AstDataFlowColumnMappingNode map in astNode.Maps) { PhysicalDataFlow.Mapping physicalmapping = new Ssis2008Emitter.IR.DataFlow.Mapping(); physicalmapping.Source = map.SourceName; physicalmapping.Destination = map.DestinationName; physicalDestination.Mappings.Add(physicalmapping); } return physicalDestination; }
public static PhysicalDataFlow.OLEDBCommand Lower(this AstTransformation.AstOleDbCommandNode astNode) { if (astNode.AsClassOnly) { return null; } Ssis2008Emitter.IR.DataFlow.OLEDBCommand physicalNode = new Ssis2008Emitter.IR.DataFlow.OLEDBCommand(); AddConnection(astNode.Connection); physicalNode.Connection = astNode.Connection.Name; physicalNode.Name = astNode.Name; physicalNode.Command = astNode.Command; foreach (AstTransformation.AstDataFlowColumnMappingNode map in astNode.Maps) { Ssis2008Emitter.IR.DataFlow.Mapping physicalMapping = new Ssis2008Emitter.IR.DataFlow.Mapping(); physicalMapping.Source = map.SourceName; physicalMapping.Destination = map.DestinationName; physicalMapping.Parent = physicalNode; physicalNode.Mappings.Add(physicalMapping); } return physicalNode; }