SapHanaCommandBatcherColumnMappingCollection
This class is a Collection<SapHanaBulkInsertMapItem> used to define the source-to-destination column mappings of a SapHanaCommandBatcher.
It backs SapHanaCommandBatcher’s ColumnMappings property, and reuses SapHanaBulkInsertMapItem — the same mapping type HanaBulkCopy usage in this package binds against — rather than a duplicate type of its own. Its Add(sourceColumn, destinationColumn) overload creates and appends a SapHanaBulkInsertMapItem; an explicit HanaDbType for a mapping can instead be added directly via the base Collection<T>.Add(SapHanaBulkInsertMapItem).
Usability
using var batcher = new SapHanaCommandBatcher(connection)
{
DestinationTableName = "\"Person\"",
TableName = "Person"
};
batcher.ColumnMappings.Add("FirstName", "FName");
batcher.ColumnMappings.Add("LastName", "LName");
batcher.ColumnMappings.Add(new SapHanaBulkInsertMapItem("Notes", "Notes", HanaDbType.NClob));
When
ColumnMappingsis left empty, SapHanaCommandBatcher maps every source column to a destination column of the same name.