mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-19 20:38:16 +08:00
## v0.1.13
- 修改 连接池内部 Ping Timeout 值暂定 5秒; - 优化 初始化时若数据库超时,则放弃预热; - FreeSql.Repository 下增加 ISelect.FromRepository 扩展方法,实现分表的多表查询; - 增加 FreeSql.Repository Autofac 泛型注入,可利用实现全局过滤+分表分库; - 补充 GuidRepository 插入数据时,根据 filter 参数设定进行数据验证;
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<Version>0.1.12</Version>
|
||||
<Version>0.1.13</Version>
|
||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
<Authors>YeXiangQin</Authors>
|
||||
<Description>打造 .NETCore 最方便的 ORM,DbFirst 与 CodeFirst 混合使用,提供从实体同步数据库,或者从数据库生成实体代码,支持 MySql/SqlServer/PostgreSQL/Oracle/Sqlite,读写分离、分表分库。</Description>
|
||||
|
@ -196,6 +196,13 @@ namespace FreeSql {
|
||||
/// 多表条件查询
|
||||
/// </summary>
|
||||
/// <typeparam name="T2"></typeparam>
|
||||
/// <param name="exp">lambda表达式</param>
|
||||
/// <returns></returns>
|
||||
ISelect<T1> Where<T2>(Expression<Func<T2, bool>> exp) where T2 : class;
|
||||
/// <summary>
|
||||
/// 多表条件查询
|
||||
/// </summary>
|
||||
/// <typeparam name="T2"></typeparam>
|
||||
/// <typeparam name="T3"></typeparam>
|
||||
/// <param name="exp">lambda表达式</param>
|
||||
/// <returns></returns>
|
||||
|
@ -108,6 +108,7 @@ namespace FreeSql.Internal.CommonProvider {
|
||||
public ISelect<T1> Where(Expression<Func<T1, bool>> exp) => this.InternalWhere(exp?.Body);
|
||||
|
||||
public ISelect<T1> Where<T2>(Expression<Func<T1, T2, bool>> exp) where T2 : class => this.InternalWhere(exp?.Body);
|
||||
public ISelect<T1> Where<T2>(Expression<Func<T2, bool>> exp) where T2 : class => this.InternalWhere(exp?.Body);
|
||||
|
||||
public ISelect<T1> Where<T2, T3>(Expression<Func<T1, T2, T3, bool>> exp) where T2 : class where T3 : class => this.InternalWhere(exp?.Body);
|
||||
|
||||
|
@ -141,7 +141,7 @@ namespace FreeSql.MySql {
|
||||
|
||||
static DbCommand PingCommand(DbConnection conn) {
|
||||
var cmd = conn.CreateCommand();
|
||||
cmd.CommandTimeout = 1;
|
||||
cmd.CommandTimeout = 5;
|
||||
cmd.CommandText = "select 1";
|
||||
return cmd;
|
||||
}
|
||||
|
@ -155,7 +155,7 @@ namespace FreeSql.Oracle {
|
||||
|
||||
static DbCommand PingCommand(DbConnection conn) {
|
||||
var cmd = conn.CreateCommand();
|
||||
cmd.CommandTimeout = 1;
|
||||
cmd.CommandTimeout = 5;
|
||||
cmd.CommandText = "select 1 from dual";
|
||||
return cmd;
|
||||
}
|
||||
|
@ -150,7 +150,7 @@ namespace FreeSql.PostgreSQL {
|
||||
|
||||
static DbCommand PingCommand(DbConnection conn) {
|
||||
var cmd = conn.CreateCommand();
|
||||
cmd.CommandTimeout = 1;
|
||||
cmd.CommandTimeout = 5;
|
||||
cmd.CommandText = "select 1";
|
||||
return cmd;
|
||||
}
|
||||
|
@ -145,7 +145,7 @@ namespace FreeSql.SqlServer {
|
||||
|
||||
static DbCommand PingCommand(DbConnection conn) {
|
||||
var cmd = conn.CreateCommand();
|
||||
cmd.CommandTimeout = 1;
|
||||
cmd.CommandTimeout = 5;
|
||||
cmd.CommandText = "select 1";
|
||||
return cmd;
|
||||
}
|
||||
|
@ -151,7 +151,7 @@ namespace FreeSql.Sqlite {
|
||||
|
||||
static DbCommand PingCommand(DbConnection conn) {
|
||||
var cmd = conn.CreateCommand();
|
||||
cmd.CommandTimeout = 1;
|
||||
cmd.CommandTimeout = 5;
|
||||
cmd.CommandText = "select 1";
|
||||
return cmd;
|
||||
}
|
||||
|
Reference in New Issue
Block a user