Skip to content

Commit 3b43c28

Browse files
authored
Merge pull request #1176 from klym1/bulk-copy-conflict-option
Add ConflictOption property to MySqlBulkCopy.
2 parents 62ad22d + 7d6a9bf commit 3b43c28

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/MySqlConnector/MySqlBulkCopy.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ public MySqlBulkCopy(MySqlConnection connection, MySqlTransaction? transaction =
5656
ColumnMappings = new();
5757
}
5858

59+
/// <summary>
60+
/// A <see cref="MySqlBulkLoaderConflictOption"/> value that specifies how conflicts are resolved (default <see cref="MySqlBulkLoaderConflictOption.None"/>).
61+
/// </summary>
62+
public MySqlBulkLoaderConflictOption ConflictOption { get; set; }
63+
5964
/// <summary>
6065
/// The number of seconds for the operation to complete before it times out, or <c>0</c> for no timeout.
6166
/// </summary>
@@ -247,6 +252,7 @@ private async ValueTask<MySqlBulkCopyResult> WriteToServerAsync(IOBehavior ioBeh
247252
Source = this,
248253
TableName = tableName,
249254
Timeout = BulkCopyTimeout,
255+
ConflictOption = ConflictOption,
250256
};
251257

252258
var closeConnection = false;

0 commit comments

Comments
 (0)