MergeBulkOptions<T>

Class MergeBulkOptions<T>

Options used for BulkMerge operations.

Inheritance
MergeBulkOptions<T>
Namespace: ETLBox.DbExtensions
Assembly: ETLBox.DbExtensions.dll
Syntax
    public class MergeBulkOptions<T> : BulkOptionsShared<T>
Type Parameters
NameDescription
T

Type of data used for operation

Properties

CacheMode

Determines the cache mode. Default is Full. If set to Partial, only data that is needed to process the current batch is loaded from the destination table. This will slow down execution performance, but memory consumption may decrease. If MergeMode is set to Full, this setting is ignored (Full is used)

Declaration
    public CacheMode CacheMode { get; set; }
Property Value
TypeDescription
CacheMode

CompareColumns

Define properties to check for equality during merge to decide if an update is needed.

Declaration
    public ICollection<CompareColumn> CompareColumns { get; set; }
Property Value
TypeDescription
ICollection<CompareColumn>

CompareFunc

By default, the CompareColumns are used to determine if a row needs to be updated. You can override the matching behavior using your own compare function which takes the current row and the row from the destination table as input and returns true if the row needs to be updated, and false if not. You still need to define the CompareColumns to specify which columns should be retrieved from the destination table.

Declaration
    public Func<object, object, bool> CompareFunc { get; set; }
Property Value
TypeDescription
Func<object, object, bool>

DeleteColumns

List property names along with a specific value indicating if a row is eligible for deletion during the merge operation. This option provides a way to mark rows for deletion based on certain criteria. Only applies if MergeMode is set to Delta.

Declaration
    public ICollection<DeleteColumn> DeleteColumns { get; set; }
Property Value
TypeDescription
ICollection<DeleteColumn>

EvictionPolicy

The eviction policy for the cache.

Declaration
    public CacheEvictionPolicy EvictionPolicy { get; set; }
Property Value
TypeDescription
CacheEvictionPolicy

FindDuplicates

Indicates whether to look for duplicate records

Declaration
    public bool FindDuplicates { get; set; }
Property Value
TypeDescription
bool

MaxCacheSize

The maximum number of records to cache in memory.

Declaration
    public int MaxCacheSize { get; set; }
Property Value
TypeDescription
int

MergeMode

Specifies the merge mode. Default is Full.

Declaration
    public MergeMode MergeMode { get; set; }
Property Value
TypeDescription
MergeMode

UpdateColumns

Specify properties to be updated when a row needs updating, by default all non-ID columns are updated.

Declaration
    public ICollection<UpdateColumn> UpdateColumns { get; set; }
Property Value
TypeDescription
ICollection<UpdateColumn>