Browse Source

code optimization

pull/1/MERGE
SUNKAIXUAN 4 years ago
parent
commit
d9c3013fa3
  1. 29
      Src/Asp.Net/SqlSugar/Realization/MySql/SqlBuilder/MySqlBlueCopy.cs

29
Src/Asp.Net/SqlSugar/Realization/MySql/SqlBuilder/MySqlBlueCopy.cs

@ -25,13 +25,12 @@ namespace SqlSugar
this.Builder = builder;
this.Entitys = entitys;
}
public bool ExecuteBlueCopy(string chara)
public bool ExecuteBlueCopy(string characterSet)
{
this.Chara = chara;
this.Chara = characterSet;
return ExecuteBlueCopy();
}
public bool ExecuteBlueCopy()
{
var IsBulkLoad = false;
@ -112,6 +111,18 @@ namespace SqlSugar
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()
{
if (this.Chara == null)
@ -124,17 +135,6 @@ namespace SqlSugar
}
}
public Task<bool> ExecuteBlueCopyAsync()
{
return Task.FromResult(ExecuteBlueCopy());
}
public Task<bool> ExecuteBlueCopyAsync(string chara)
{
this.Chara = chara;
return Task.FromResult(ExecuteBlueCopy());
}
private void CloseDb()
{
if (this.Context.CurrentConnectionConfig.IsAutoCloseConnection && this.Context.Ado.Transaction == null)
@ -170,5 +170,6 @@ namespace SqlSugar
}
return sb.ToString();
}
#endregion
}
}
Loading…
Cancel
Save