Beispiel #1
0
        public static IList <FieldPairReference> GetFieldPairs(
            this OutputIntoClause outputIntoClause,
            ILogger logger,
            SchemaFile file
            )
        {
            var intoFields = outputIntoClause
                             .IntoTable
                             .GetSchemaObjectReferences(logger, file)
                             .First()
                             .Value
                             .Columns;

            var sourceFields = outputIntoClause
                               .SelectColumns
                               .GetFields(logger, file)
                               .ToList();

            return(intoFields
                   .Zip(sourceFields, (target, source) => new FieldPairReference()
            {
                Left = target,
                Right = source,
                Fragment = outputIntoClause
            })
                   .ToList());
        }
Beispiel #2
0
 public override void Visit(OutputIntoClause node) { this.action(node); }
 public override void ExplicitVisit(OutputIntoClause fragment)
 {
     _fragments.Add(fragment);
 }