This commit is contained in:
xuejiaming 2021-08-23 10:23:48 +08:00
parent 7d7d23480d
commit 184f45e119
3 changed files with 16 additions and 16 deletions

View File

@ -10,9 +10,9 @@
Release | EF Core | .NET Standard | .NET (Core) Release | EF Core | .NET Standard | .NET (Core)
--- | --- | --- | --- --- | --- | --- | ---
[5.2.x.x](https://www.nuget.org/packages/ShardingCore/5.2.0.08) | >= 5.0.x | 2.1 | 3.0+ [5.2.x.x](https://www.nuget.org/packages/ShardingCore/5.2.0.09) | >= 5.0.x | 2.1 | 3.0+
[3.2.x.x](https://www.nuget.org/packages/ShardingCore/3.2.0.08) | 3.1.10 | 2.0 | 2.0+ [3.2.x.x](https://www.nuget.org/packages/ShardingCore/3.2.0.09) | 3.1.10 | 2.0 | 2.0+
[2.2.x.x](https://www.nuget.org/packages/ShardingCore/2.2.0.08) | 2.2.6 | 2.0 | 2.0+ [2.2.x.x](https://www.nuget.org/packages/ShardingCore/2.2.0.09) | 2.2.6 | 2.0 | 2.0+
### 数据库支持 ### 数据库支持
数据库 | 是否支持 | 支持情况 数据库 | 是否支持 | 支持情况
--- | --- | --- --- | --- | ---
@ -89,17 +89,17 @@ Oracle | 支持 | 未测试
- [针对分页进行优化] 大页数跳转支持低内存流式处理 - [针对分页进行优化] 大页数跳转支持低内存流式处理
## 缺点 ## 缺点
- [暂不支持分库] - [暂不支持分库]
- [消耗连接]出现分表与分表对象进行join如果条件没法索引到具体表会生成```笛卡尔积```导致连接数爆炸,后期会进行针对该情况的配置 - [消耗连接]出现分表与分表对象进行join如果条件没法索引到具体表会生成```笛卡尔积```导致连接数爆炸,后期会进行针对该情况的配置
- [该库比较年轻] 可能会有一系列bug或者单元测试不到位的情况,但是只要你在群里或者提了issues我会尽快解决 - [该库比较年轻] 可能会有一系列bug或者单元测试不到位的情况,但是只要你在群里或者提了issues我会尽快解决
## 安装 ## 安装
```xml ```xml
<PackageReference Include="ShardingCore" Version="5.2.0.08" /> <PackageReference Include="ShardingCore" Version="5.2.0.09" />
or or
<PackageReference Include="ShardingCore" Version="3.2.0.08" /> <PackageReference Include="ShardingCore" Version="3.2.0.09" />
or or
<PackageReference Include="ShardingCore" Version="2.2.0.08" /> <PackageReference Include="ShardingCore" Version="2.2.0.09" />
``` ```
## 配置 ## 配置
@ -349,11 +349,11 @@ AbstractSimpleShardingYearKeyLongVirtualTableRoute |按时间戳 |yyyy | `>,>=,<
sysUserMod98.Name = "name_update"+new Random().Next(1,99)+"_98"; sysUserMod98.Name = "name_update"+new Random().Next(1,99)+"_98";
await _defaultTableDbContext.SaveChangesAsync(); await _defaultTableDbContext.SaveChangesAsync();
--log info --log info
info: Microsoft.EntityFrameworkCore.Database.Command[20101] Executed DbCommand (1ms) [Parameters=[@p1='?' (Size = 128), @p0='?' (Size = 128)], CommandType='Text', CommandTimeout='30']
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] SET NOCOUNT ON;
SELECT COUNT(*) UPDATE [SysUserMod_02] SET [Name] = @p0
FROM [SysUserMod_01] AS [s] WHERE [Id] = @p1;
WHERE [s].[Age] <= 10 SELECT @@ROWCOUNT;
``` ```

View File

@ -1,8 +1,8 @@
:start :start
::定义版本 ::定义版本
set EFCORE2=2.2.0.08 set EFCORE2=2.2.0.09
set EFCORE3=3.2.0.08 set EFCORE3=3.2.0.09
set EFCORE5=5.2.0.08 set EFCORE5=5.2.0.09
::删除所有bin与obj下的文件 ::删除所有bin与obj下的文件
@echo off @echo off

View File

@ -231,7 +231,7 @@ namespace ShardingCore.EFCores
if (streamEngineMethod == null) if (streamEngineMethod == null)
throw new ShardingCoreException("cant found InMemoryAsyncStreamMergeEngine method [DoExecuteAsync]"); throw new ShardingCoreException("cant found InMemoryAsyncStreamMergeEngine method [DoExecuteAsync]");
var @params = async ? new object[] { cancellationToken } : new object[0]; var @params = async ? new object[] { cancellationToken } : new object[0];
return (TResult)streamEngineMethod.MakeGenericMethod(new Type[] { resultEntityType }).Invoke(streamEngine, @params); return (TResult)streamEngineMethod.MakeGenericMethod(new Type[] { queryEntityType }).Invoke(streamEngine, @params);
} }
private TResult GenericMergeExecute2<TResult>(Type streamMergeEngineType, IShardingDbContext shardingDbContext, MethodCallExpression query, bool async, CancellationToken cancellationToken) private TResult GenericMergeExecute2<TResult>(Type streamMergeEngineType, IShardingDbContext shardingDbContext, MethodCallExpression query, bool async, CancellationToken cancellationToken)
{ {