添加配置项
This commit is contained in:
@@ -4,14 +4,17 @@ public class DatabaseOutputOptions
|
||||
{
|
||||
public string? ConnectionString { get; set; }
|
||||
|
||||
public int MaxAllowedPacket { get; set; } = 64 * 1024 * 1024;
|
||||
public int MaxAllowedPacket { get; set; } = 32 * 1024 * 1024;
|
||||
|
||||
public int FlushCount { get; set; } = 10000;
|
||||
|
||||
public int MaxDatabaseOutputTask { get; set; } = 4;
|
||||
|
||||
public bool TreatJsonAsHex { get; set; } = true;
|
||||
|
||||
public string[] NoOutput { get; set; } = [];
|
||||
|
||||
public Dictionary<string, string>? ForUpdate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 配置导入数据的特殊列
|
||||
@@ -22,4 +25,12 @@ public class DatabaseOutputOptions
|
||||
{
|
||||
return ColumnTypeConfig.GetValueOrDefault($"{table}.{column}", ColumnType.UnDefine);
|
||||
}
|
||||
|
||||
public bool TryGetForUpdate(string table, out string? forUpdate)
|
||||
{
|
||||
forUpdate = null;
|
||||
if (ForUpdate is null || !ForUpdate.TryGetValue(table, out forUpdate))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user