Browse Source

Synchronization code

pull/31/head
sunkaixuan 2 years ago
parent
commit
350eb1833b
  1. 27
      Src/Asp.NetCore2/SqlSugar/Realization/Oracle/SqlBuilder/OracleInsertBuilder.cs

27
Src/Asp.NetCore2/SqlSugar/Realization/Oracle/SqlBuilder/OracleInsertBuilder.cs

@ -50,18 +50,43 @@ namespace SqlSugar
else else
{ {
var bigSize = 500; var bigSize = 500;
bigSize = GetBigSize(bigSize);
if (groupList.Count < bigSize) if (groupList.Count < bigSize)
{ {
string result = Small(identities, groupList, columnsString); string result = Small(identities, groupList, columnsString);
return result; return result;
} }
else else
{ {
string result = Big(identities, groupList, columnsString); string result = Big(identities, groupList, columnsString);
return result; return result;
} }
} }
} }
private int GetBigSize(int bigSize)
{
var columnCount = this.EntityInfo.Columns.Count;
if (columnCount > 100)
{
bigSize = 15;
}
else if (columnCount > 60)
{
bigSize = 25;
}
else if (columnCount > 40)
{
bigSize = 50;
}
else if (columnCount > 30)
{
bigSize = 100;
}
return bigSize;
}
private string Big(List<EntityColumnInfo> identities, List<IGrouping<int, DbColumnInfo>> groupList, string columnsString) private string Big(List<EntityColumnInfo> identities, List<IGrouping<int, DbColumnInfo>> groupList, string columnsString)
{ {
this.Context.Utilities.PageEach(groupList, 100, groupListPasge => this.Context.Utilities.PageEach(groupList, 100, groupListPasge =>

Loading…
Cancel
Save