mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-20 02:29:39 +08:00
Update .net framework
This commit is contained in:
@@ -14,6 +14,7 @@ namespace SqlSugar
|
|||||||
internal SqlSugarProvider Context { get; set; }
|
internal SqlSugarProvider Context { get; set; }
|
||||||
internal ISqlBuilder Builder { get; set; }
|
internal ISqlBuilder Builder { get; set; }
|
||||||
internal T[] Entitys { get; set; }
|
internal T[] Entitys { get; set; }
|
||||||
|
internal string Chara { get; set; }
|
||||||
private MySqlBlueCopy()
|
private MySqlBlueCopy()
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -24,6 +25,12 @@ namespace SqlSugar
|
|||||||
this.Builder = builder;
|
this.Builder = builder;
|
||||||
this.Entitys = entitys;
|
this.Entitys = entitys;
|
||||||
}
|
}
|
||||||
|
public bool ExecuteBlueCopy(string chara)
|
||||||
|
{
|
||||||
|
this.Chara = chara;
|
||||||
|
return ExecuteBlueCopy();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public bool ExecuteBlueCopy()
|
public bool ExecuteBlueCopy()
|
||||||
{
|
{
|
||||||
@@ -76,7 +83,7 @@ namespace SqlSugar
|
|||||||
// IsolationLevel.Parse
|
// IsolationLevel.Parse
|
||||||
MySqlBulkLoader bulk = new MySqlBulkLoader(conn)
|
MySqlBulkLoader bulk = new MySqlBulkLoader(conn)
|
||||||
{
|
{
|
||||||
CharacterSet = "UTF8",
|
CharacterSet = GetChara(),
|
||||||
FieldTerminator = ",",
|
FieldTerminator = ",",
|
||||||
FieldQuotationCharacter = '"',
|
FieldQuotationCharacter = '"',
|
||||||
EscapeCharacter = '"',
|
EscapeCharacter = '"',
|
||||||
@@ -105,11 +112,28 @@ namespace SqlSugar
|
|||||||
return IsBulkLoad; ;
|
return IsBulkLoad; ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private string GetChara()
|
||||||
|
{
|
||||||
|
if (this.Chara == null)
|
||||||
|
{
|
||||||
|
return "UTF8";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return this.Chara;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public Task<bool> ExecuteBlueCopyAsync()
|
public Task<bool> ExecuteBlueCopyAsync()
|
||||||
{
|
{
|
||||||
return Task.FromResult(ExecuteBlueCopy());
|
return Task.FromResult(ExecuteBlueCopy());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Task<bool> ExecuteBlueCopyAsync(string chara)
|
||||||
|
{
|
||||||
|
this.Chara = chara;
|
||||||
|
return Task.FromResult(ExecuteBlueCopy());
|
||||||
|
}
|
||||||
|
|
||||||
private void CloseDb()
|
private void CloseDb()
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user