支持按多个表开立线程
This commit is contained in:
@@ -65,6 +65,8 @@ public class DataRecord
|
||||
|
||||
public bool SetField(string columnName, string value) => SetField(this, columnName,value);
|
||||
|
||||
public string GetCacheKey(string columnName) => GetCacheKey(this, columnName);
|
||||
|
||||
public bool SetField( DataRecord record,string columnName,string value)
|
||||
{
|
||||
if (record.Headers is null)
|
||||
@@ -75,4 +77,14 @@ public class DataRecord
|
||||
record.Fields[idx] = value;
|
||||
return true;
|
||||
}
|
||||
public string GetCacheKey(DataRecord record, string columnName)
|
||||
{
|
||||
if (TryGetField(record, columnName, out var value))
|
||||
{
|
||||
return $"{TableName}_{columnName}_{value}";
|
||||
}else
|
||||
throw new IndexOutOfRangeException($"Column name:{columnName} not found in this record.");
|
||||
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user