mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-04-22 10:42:52 +08:00
修复批量插入/更新大量数据时,未使用NoneParameter,会导致部分未执行的bug;
This commit is contained in:
parent
eb2d258f08
commit
fe6d632624
@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netstandard2.0;net45</TargetFrameworks>
|
||||
<Version>0.6.8</Version>
|
||||
<Version>0.6.9</Version>
|
||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
<Authors>YeXiangQin</Authors>
|
||||
<Description>FreeSql 扩展包,可实现【延时加载】属性.</Description>
|
||||
|
@ -267,6 +267,18 @@ namespace FreeSql.Tests {
|
||||
[Fact]
|
||||
public void Test1() {
|
||||
|
||||
var testaddlist = new List<NewsArticle>();
|
||||
for(var a = 0; a < 133905; a++) {
|
||||
testaddlist.Add(new NewsArticle {
|
||||
ArticleTitle = "testaddlist_topic" + a,
|
||||
Hits = a,
|
||||
});
|
||||
}
|
||||
g.sqlite.Insert<NewsArticle>(testaddlist)
|
||||
//.NoneParameter()
|
||||
.ExecuteAffrows();
|
||||
|
||||
|
||||
g.mysql.Aop.ParseExpression = (s, e) => {
|
||||
if (e.Expression.NodeType == ExpressionType.Call) {
|
||||
var callExp = e.Expression as MethodCallExpression;
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netstandard2.0;net45</TargetFrameworks>
|
||||
<Version>0.6.8</Version>
|
||||
<Version>0.6.9</Version>
|
||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
<Authors>YeXiangQin</Authors>
|
||||
<Description>FreeSql is the most convenient ORM in dotnet. It supports Mysql, Postgresql, SqlServer, Oracle and Sqlite.</Description>
|
||||
|
@ -91,7 +91,7 @@ namespace FreeSql.Internal.CommonProvider {
|
||||
var pamTotal = colSum * _source.Count;
|
||||
if (pamTotal < parameterLimit) return new[] { _source };
|
||||
|
||||
var execCount = (int)Math.Ceiling(1.0 * pamTotal / parameterLimit);
|
||||
var execCount = (int)Math.Ceiling(1.0 * pamTotal / takeMax / colSum);
|
||||
var ret = new List<T1>[execCount];
|
||||
for (var a = 0; a < execCount; a++) {
|
||||
var subSource = new List<T1>();
|
||||
|
@ -96,7 +96,7 @@ namespace FreeSql.Internal.CommonProvider {
|
||||
var pamTotal = colSum * _source.Count;
|
||||
if (pamTotal < parameterLimit) return new[] { _source };
|
||||
|
||||
var execCount = (int)Math.Ceiling(1.0 * pamTotal / parameterLimit);
|
||||
var execCount = (int)Math.Ceiling(1.0 * pamTotal / takeMax / colSum);
|
||||
var ret = new List<T1>[execCount];
|
||||
for (var a = 0; a < execCount; a++) {
|
||||
var subSource = new List<T1>();
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netstandard2.0;net452</TargetFrameworks>
|
||||
<Version>0.6.8</Version>
|
||||
<Version>0.6.9</Version>
|
||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
<Authors>YeXiangQin</Authors>
|
||||
<Description>FreeSql 数据库实现,基于 MySql 5.6</Description>
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netstandard2.0;net45</TargetFrameworks>
|
||||
<Version>0.6.8</Version>
|
||||
<Version>0.6.9</Version>
|
||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
<Authors>YeXiangQin</Authors>
|
||||
<Description>FreeSql 数据库实现,基于 MySql 5.6</Description>
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netstandard2.0;net45</TargetFrameworks>
|
||||
<Version>0.6.8</Version>
|
||||
<Version>0.6.9</Version>
|
||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
<Authors>YeXiangQin</Authors>
|
||||
<Description>FreeSql 数据库实现,基于 Oracle 11</Description>
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netstandard2.0;net45</TargetFrameworks>
|
||||
<Version>0.6.8</Version>
|
||||
<Version>0.6.9</Version>
|
||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
<Authors>YeXiangQin</Authors>
|
||||
<Description>FreeSql 数据库实现,基于 PostgreSQL 9.5</Description>
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netstandard2.0;net451</TargetFrameworks>
|
||||
<Version>0.6.8</Version>
|
||||
<Version>0.6.9</Version>
|
||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
<Authors>YeXiangQin</Authors>
|
||||
<Description>FreeSql 数据库实现,基于 SqlServer 2005+,并根据版本适配分页方法:row_number 或 offset fetch next</Description>
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netstandard2.0;net45</TargetFrameworks>
|
||||
<Version>0.6.8</Version>
|
||||
<Version>0.6.9</Version>
|
||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
<Authors>YeXiangQin</Authors>
|
||||
<Description>FreeSql 数据库实现,基于 Sqlite 3.0</Description>
|
||||
|
Loading…
x
Reference in New Issue
Block a user