mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-07-16 07:57:33 +08:00
code optimization
This commit is contained in:
parent
23adbefe94
commit
d9c3013fa3
@ -25,13 +25,12 @@ namespace SqlSugar
|
|||||||
this.Builder = builder;
|
this.Builder = builder;
|
||||||
this.Entitys = entitys;
|
this.Entitys = entitys;
|
||||||
}
|
}
|
||||||
public bool ExecuteBlueCopy(string chara)
|
public bool ExecuteBlueCopy(string characterSet)
|
||||||
{
|
{
|
||||||
this.Chara = chara;
|
this.Chara = characterSet;
|
||||||
return ExecuteBlueCopy();
|
return ExecuteBlueCopy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public bool ExecuteBlueCopy()
|
public bool ExecuteBlueCopy()
|
||||||
{
|
{
|
||||||
var IsBulkLoad = false;
|
var IsBulkLoad = false;
|
||||||
@ -112,29 +111,30 @@ namespace SqlSugar
|
|||||||
return IsBulkLoad; ;
|
return IsBulkLoad; ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Task<bool> ExecuteBlueCopyAsync()
|
||||||
|
{
|
||||||
|
return Task.FromResult(ExecuteBlueCopy());
|
||||||
|
}
|
||||||
|
|
||||||
|
public Task<bool> ExecuteBlueCopyAsync(string characterSet)
|
||||||
|
{
|
||||||
|
this.Chara = characterSet;
|
||||||
|
return Task.FromResult(ExecuteBlueCopy());
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Helper
|
||||||
private string GetChara()
|
private string GetChara()
|
||||||
{
|
{
|
||||||
if (this.Chara == null)
|
if (this.Chara == null)
|
||||||
{
|
{
|
||||||
return "UTF8";
|
return "UTF8";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return this.Chara;
|
return this.Chara;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Task<bool> ExecuteBlueCopyAsync()
|
|
||||||
{
|
|
||||||
return Task.FromResult(ExecuteBlueCopy());
|
|
||||||
}
|
|
||||||
|
|
||||||
public Task<bool> ExecuteBlueCopyAsync(string chara)
|
|
||||||
{
|
|
||||||
this.Chara = chara;
|
|
||||||
return Task.FromResult(ExecuteBlueCopy());
|
|
||||||
}
|
|
||||||
|
|
||||||
private void CloseDb()
|
private void CloseDb()
|
||||||
{
|
{
|
||||||
if (this.Context.CurrentConnectionConfig.IsAutoCloseConnection && this.Context.Ado.Transaction == null)
|
if (this.Context.CurrentConnectionConfig.IsAutoCloseConnection && this.Context.Ado.Transaction == null)
|
||||||
@ -169,6 +169,7 @@ namespace SqlSugar
|
|||||||
sb.AppendLine();
|
sb.AppendLine();
|
||||||
}
|
}
|
||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user