TableMapping
Complete table mapping configuration. Spec Section 7.3.
public sealed record TableMapping : IEquatable<TableMapping>
Constructors
TableMapping
public TableMapping(string Id, string SourceTable, string? TargetTable, MappingDirection Direction, bool Enabled, PkMapping? PkMapping, IReadOnlyList<ColumnMapping> ColumnMappings, IReadOnlyList<string> ExcludedColumns, SyncFilter? Filter, SyncTrackingConfig SyncTracking, bool IsMultiTarget = false, IReadOnlyList<TargetConfig>? Targets = null)
Complete table mapping configuration. Spec Section 7.3.
| Parameter | Type | Description |
|---|---|---|
Id |
String |
Unique mapping identifier. |
SourceTable |
String |
Source table name. |
TargetTable |
String |
Target table name (single target). NULL for multi-target. |
Direction |
MappingDirection |
Sync direction. |
Enabled |
Boolean |
Whether mapping is active. |
PkMapping |
PkMapping |
Primary key column mapping. |
ColumnMappings |
ColumnMapping> |
Column mappings for single target. |
ExcludedColumns |
String> |
Columns to exclude from sync. |
Filter |
SyncFilter |
Optional filter expression. |
SyncTracking |
SyncTrackingConfig |
Sync tracking configuration. |
IsMultiTarget |
Boolean |
True if mapping to multiple tables. |
Targets |
TargetConfig> |
Target configurations for multi-target mapping. |
Properties
Id
public string Id { get; init; }
Unique mapping identifier.
SourceTable
public string SourceTable { get; init; }
Source table name.
TargetTable
public string? TargetTable { get; init; }
Target table name (single target). NULL for multi-target.
Direction
public MappingDirection Direction { get; init; }
Sync direction.
Enabled
public bool Enabled { get; init; }
Whether mapping is active.
PkMapping
public PkMapping? PkMapping { get; init; }
Primary key column mapping.
ColumnMappings
public IReadOnlyList<ColumnMapping> ColumnMappings { get; init; }
Column mappings for single target.
ExcludedColumns
public IReadOnlyList<string> ExcludedColumns { get; init; }
Columns to exclude from sync.
Filter
public SyncFilter? Filter { get; init; }
Optional filter expression.
SyncTracking
public SyncTrackingConfig SyncTracking { get; init; }
Sync tracking configuration.
IsMultiTarget
public bool IsMultiTarget { get; init; }
True if mapping to multiple tables.
Targets
public IReadOnlyList<TargetConfig>? Targets { get; init; }
Target configurations for multi-target mapping.
Methods
Identity(string, MappingDirection)
public static TableMapping Identity(string tableName, MappingDirection direction)
Creates a simple identity mapping (same table/column names).
Parameters:
| Name | Type | Description |
|---|---|---|
tableName |
String |
Table name. |
direction |
MappingDirection |
Sync direction. |
Returns: TableMapping - Identity mapping.