mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 13:06:50 +08:00
Update pgsql return pklist
This commit is contained in:
parent
c73bc9ce81
commit
aae91c90a0
@ -47,6 +47,14 @@ namespace OrmTest
|
||||
var ids2 = db.Insertable(new List<UnitIdentity01>() { new UnitIdentity01() { Name = "c" }, new UnitIdentity01() { Name = "c" } }).ExecuteReturnPkList<int>();
|
||||
if (ids2.Count(z => z > 0) != 2) { throw new Exception("unit error"); }
|
||||
if (db.Queryable<UnitIdentity01>().In(ids2).Count() != 2) { throw new Exception("unit error"); }
|
||||
var list = new List<UnitIdentity01>();
|
||||
for (int i = 0; i < 1000; i++)
|
||||
{
|
||||
list.Add(new UnitIdentity01() { Name = "a" });
|
||||
}
|
||||
var ids3 = db.Insertable(list).ExecuteReturnPkList<int>();
|
||||
if (db.Queryable<UnitIdentity01>().In(ids3).Count() != 1000) { throw new Exception("unit error"); }
|
||||
db.DbMaintenance.TruncateTable<UnitIdentity01>();
|
||||
}
|
||||
|
||||
public class UnitGuid123
|
||||
|
@ -56,6 +56,10 @@ namespace SqlSugar
|
||||
StringBuilder batchInsetrSql = new StringBuilder();
|
||||
int pageSize = 200;
|
||||
int pageIndex = 1;
|
||||
if (IsNoPage&&IsReturnPkList)
|
||||
{
|
||||
pageSize = groupList.Count;
|
||||
}
|
||||
int totalRecord = groupList.Count;
|
||||
int pageCount = (totalRecord + pageSize - 1) / pageSize;
|
||||
while (pageCount >= pageIndex)
|
||||
|
Loading…
Reference in New Issue
Block a user