mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-22 20:13:41 +08:00
Update Insetable page
This commit is contained in:
@@ -18,6 +18,10 @@ namespace SqlSugar
|
||||
|
||||
public int ExecuteCommand()
|
||||
{
|
||||
if (DataList.Count() == 1 && DataList.First() == null)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
if (PageSize == 0) { PageSize = 1000; }
|
||||
var result = 0;
|
||||
this.Context.Utilities.PageEach(DataList, PageSize, pageItem =>
|
||||
@@ -28,6 +32,10 @@ namespace SqlSugar
|
||||
}
|
||||
public async Task<int> ExecuteCommandAsync()
|
||||
{
|
||||
if (DataList.Count() == 1 && DataList.First() == null)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
if (PageSize == 0) { PageSize = 1000; }
|
||||
var result = 0;
|
||||
await this.Context.Utilities.PageEachAsync(DataList, PageSize,async pageItem =>
|
||||
@@ -39,6 +47,10 @@ namespace SqlSugar
|
||||
|
||||
public List<long> ExecuteReturnSnowflakeIdList()
|
||||
{
|
||||
if (DataList.Count() == 1 && DataList.First() == null)
|
||||
{
|
||||
return new List<long>();
|
||||
}
|
||||
if (PageSize == 0) { PageSize = 1000; }
|
||||
var result = new List<long>();
|
||||
this.Context.Utilities.PageEach(DataList, PageSize, pageItem =>
|
||||
@@ -49,6 +61,10 @@ namespace SqlSugar
|
||||
}
|
||||
public async Task<List<long>> ExecuteReturnSnowflakeIdListAsync()
|
||||
{
|
||||
if (DataList.Count() == 1 && DataList.First() == null)
|
||||
{
|
||||
return new List<long>();
|
||||
}
|
||||
if (PageSize == 0) { PageSize = 1000; }
|
||||
var result = new List<long>();
|
||||
await this.Context.Utilities.PageEachAsync(DataList, PageSize,async pageItem =>
|
||||
|
@@ -474,7 +474,8 @@ namespace SqlSugar
|
||||
result.TableName = this.InsertBuilder.AsName;
|
||||
result.IsEnableDiffLogEvent = this.IsEnableDiffLogEvent;
|
||||
result.DiffModel = this.diffModel;
|
||||
result.InsertColumns = this.InsertBuilder.DbColumnInfoList.GroupBy(it => it.TableId).First().Select(it=>it.DbColumnName).ToList();
|
||||
if(this.InsertBuilder.DbColumnInfoList.Any())
|
||||
result.InsertColumns = this.InsertBuilder.DbColumnInfoList.GroupBy(it => it.TableId).First().Select(it=>it.DbColumnName).ToList();
|
||||
return result;
|
||||
}
|
||||
public IParameterInsertable<T> UseParameter()
|
||||
|
Reference in New Issue
Block a user