支持按多个表开立线程

This commit is contained in:
2024-01-18 14:36:36 +08:00
parent 629a4d2fb5
commit 97e359468f
16 changed files with 232 additions and 198 deletions

View File

@@ -7,6 +7,7 @@ public enum ColumnType
{
Blob,
Text,
Json,
UnDefine,
}

View File

@@ -6,14 +6,5 @@ public class DatabaseOutputOptions
/// 数据库连接字符串
/// </summary>
public string? ConnectionString { get; set; }
/// <summary>
/// 输出服务的任务(Task)数
/// </summary>
public int TaskCount { get; set; }
/// <summary>
/// 每个任务每次提交到数据库的记录数量每N条构建一次SQL语句
/// </summary>
public int FlushCount { get; set; }
public int MaxAllowedPacket { get; set; } = 64*1024*1024;
}

View File

@@ -9,13 +9,16 @@ namespace ConsoleApp2.Options
public class TableInfo
{
public long SimulaRowCount { get; set; }//模拟的记录条数
public int InputTaskCount { get; set; } = 1;
public int TransformTaskCount { get; set; } = 1;
public int OutPutTaskCount { get; set; } = 1;
}
public class InputTableOptions
public class TasksOptions
{
public Dictionary<string, TableInfo> TableInfoConfig { get; set; } = new();
public int TransformTaskCount { get; set; } = 1;
public OutPutOptions OutPutOptions { get; set; }=new();
}
public class OutPutOptions
{
public int FlushCount { get; set; } = 10000;
public int OutPutTaskCount { get; set; } = 2;
}
}