diff --git a/FreeSql.DbContext/FreeSql.DbContext.csproj b/FreeSql.DbContext/FreeSql.DbContext.csproj index 644bf350..0ddefede 100644 --- a/FreeSql.DbContext/FreeSql.DbContext.csproj +++ b/FreeSql.DbContext/FreeSql.DbContext.csproj @@ -5,7 +5,7 @@ 1.5.0 true ncc;YeXiangQin - FreeSql is the ORM in .NetCore, .NetFramework, And Xamarin. It supports Mysql, Postgresql, SqlServer, Oracle, Sqlite, Odbc, 达梦, And Access + FreeSql is the ORM in .NetCore, .NetFramework, And Xamarin. It supports Mysql, Postgresql, SqlServer, Oracle, Sqlite, Odbc, 达梦, 人大金仓, And Access https://github.com/2881099/FreeSql/wiki/DbContext FreeSql ORM DbContext git diff --git a/FreeSql.Repository/FreeSql.Repository.csproj b/FreeSql.Repository/FreeSql.Repository.csproj index 3eb5cbef..7418ac57 100644 --- a/FreeSql.Repository/FreeSql.Repository.csproj +++ b/FreeSql.Repository/FreeSql.Repository.csproj @@ -4,7 +4,7 @@ netstandard2.0;netcoreapp31;netcoreapp30;netcoreapp22;netcoreapp21;net45;net40 1.5.0 ncc;YeXiangQin - FreeSql Implementation of General Repository, Support MySql/SqlServer/PostgreSQL/Oracle/Sqlite/达梦/Access, and read/write separation、and split table. + FreeSql Implementation of General Repository, Support MySql/SqlServer/PostgreSQL/Oracle/Sqlite/达梦/人大金仓/Access, and read/write separation、and split table. https://github.com/2881099/FreeSql/wiki/Repository FreeSql ORM Repository true diff --git a/FreeSql.Repository/readme.md b/FreeSql.Repository/readme.md index 1ba1f896..4c58c538 100644 --- a/FreeSql.Repository/readme.md +++ b/FreeSql.Repository/readme.md @@ -98,7 +98,7 @@ var logRepository = fsql.GetGuidRepository(null, oldname => $"{oldname}_{Da ## 兼容问题 -FreeSql 支持五种数据库,分别为 MySql/SqlServer/PostgreSQL/Oracle/Sqlite/达梦,虽然他们都为关系型数据库,但各自有着独特的技术亮点,有许多亮点值得我们使用; +FreeSql 支持多种数据库,分别为 MySql/SqlServer/PostgreSQL/Oracle/Sqlite/达梦/人大金仓/MsAccess,虽然他们都为关系型数据库,但各自有着独特的技术亮点,有许多亮点值得我们使用; 比如 SqlServer 提供的 output inserted 特性,在表使用了自增或数据库定义了默认值的时候,使用它可以快速将 insert 的数据返回。PostgreSQL 也有相应的功能,如此方便却不是每个数据库都支持。 diff --git a/FreeSql/FreeSql.csproj b/FreeSql/FreeSql.csproj index 47f36213..aeaae6e0 100644 --- a/FreeSql/FreeSql.csproj +++ b/FreeSql/FreeSql.csproj @@ -5,7 +5,7 @@ 1.5.0 true ncc;YeXiangQin - FreeSql is the ORM in .NetCore, .NetFramework, And Xamarin. It supports Mysql, Postgresql, SqlServer, Oracle, Sqlite, Odbc, 达梦, And Access + FreeSql is the ORM in .NetCore, .NetFramework, And Xamarin. It supports Mysql, Postgresql, SqlServer, Oracle, Sqlite, Odbc, 达梦, 人大金仓, And Access https://github.com/2881099/FreeSql https://github.com/2881099/FreeSql git diff --git a/FreeSql/FreeSql.xml b/FreeSql/FreeSql.xml index d1259f1c..06756040 100644 --- a/FreeSql/FreeSql.xml +++ b/FreeSql/FreeSql.xml @@ -1366,7 +1366,8 @@ PostgreSQL: for update nowait Oracle: for update nowait Sqlite: 无效果 - 达梦: for update nowait + 达梦: for update nowait + 人大金仓: for update nowait noawait @@ -2410,6 +2411,137 @@ + + + 查询,若使用读写分离,查询【从库】条件cmdText.StartsWith("SELECT "),否则查询【主库】 + + + + + + + + + 查询,ExecuteReaderAsync(dr => {}, "select * from user where age > ?age", new { age = 25 }) + + + + + + + 查询 + + + + + + + 查询,ExecuteArrayAsync("select * from user where age > ?age", new { age = 25 }) + + + + + + + + 查询 + + + + + + + 查询,ExecuteDataSetAsync("select * from user where age > ?age; select 2", new { age = 25 }) + + + + + + + + 查询 + + + + + + + 查询,ExecuteDataTableAsync("select * from user where age > ?age", new { age = 25 }) + + + + + + + + 在【主库】执行 + + + + + + + + 在【主库】执行,ExecuteNonQueryAsync("delete from user where age > ?age", new { age = 25 }) + + + + + + + + 在【主库】执行 + + + + + + + + 在【主库】执行,ExecuteScalarAsync("select 1 from user where age > ?age", new { age = 25 }) + + + + + + + + 执行SQL返回对象集合,QueryAsync<User>("select * from user where age > ?age", new SqlParameter { ParameterName = "age", Value = 25 }) + + + + + + + + + + 执行SQL返回对象集合,QueryAsync<User>("select * from user where age > ?age", new { age = 25 }) + + + + + + + + + 执行SQL返回对象集合,Query<User>("select * from user where age > ?age; select * from address", new SqlParameter { ParameterName = "age", Value = 25 }) + + + + + + + + + + 执行SQL返回对象集合,Query<User>("select * from user where age > ?age; select * from address", new { age = 25 }) + + + + + + 可自定义解析表达式 @@ -2677,7 +2809,7 @@ - 转大写同步结构,适用 Oracle/达梦 + 转大写同步结构,适用 Oracle/达梦/人大金仓 @@ -3012,6 +3144,12 @@ 超时 + + + 获取资源 + + + 使用完毕后,归还资源 @@ -3082,6 +3220,12 @@ 资源对象 + + + 从对象池获取对象成功的时候触发,通过该方法统计或初始化对象 + + 资源对象 + 归还对象给对象池的时候触发 @@ -3723,172 +3867,3 @@ -xpression{System.Func{``0,``1,``2,``3,``4,System.Boolean}})"> - - 使用 or 拼接两个 lambda 表达式 - - - - - - 使用 or 拼接两个 lambda 表达式 - - - true 时生效 - - - - - - 将 lambda 表达式取反 - - - true 时生效 - - - - - 生成类似Mongodb的ObjectId有序、不重复Guid - - - - - - 插入数据 - - - - - - - 插入数据,传入实体 - - - - - - - - 插入数据,传入实体数组 - - - - - - - - 插入数据,传入实体集合 - - - - - - - - 插入数据,传入实体集合 - - - - - - - - 插入或更新数据 - MySql: on duplicate key update - PostgreSQL: on conflict do update - SqlServer: merge into - Oracle: merge into - Sqlite: replace into - Dameng: merge into - 注意:还可以使用 FreeSql.Repository 的 InsertOrUpdate 方法 - - - - - - - 修改数据 - - - - - - - 修改数据,传入动态条件,如:主键值 | new[]{主键值1,主键值2} | TEntity1 | new[]{TEntity1,TEntity2} | new{id=1} - - - 主键值、主键值集合、实体、实体集合、匿名对象、匿名对象集合 - - - - - 查询数据 - - - - - - - 查询数据,传入动态条件,如:主键值 | new[]{主键值1,主键值2} | TEntity1 | new[]{TEntity1,TEntity2} | new{id=1} - - - 主键值、主键值集合、实体、实体集合、匿名对象、匿名对象集合 - - - - - 删除数据 - - - - - - - 删除数据,传入动态条件,如:主键值 | new[]{主键值1,主键值2} | TEntity1 | new[]{TEntity1,TEntity2} | new{id=1} - - - 主键值、主键值集合、实体、实体集合、匿名对象、匿名对象集合 - - - - - 开启事务(不支持异步) - v1.5.0 关闭了线程事务超时自动提交的机制 - - 事务体 () => {} - - - - 开启事务(不支持异步) - v1.5.0 关闭了线程事务超时自动提交的机制 - - - 事务体 () => {} - - - - 数据库访问对象 - - - - - 所有拦截方法都在这里 - - - - - CodeFirst 模式开发相关方法 - - - - - DbFirst 模式开发相关方法 - - - - - 全局过滤设置,可默认附加为 Select/Update/Delete 条件 - - - - diff --git a/FreeSql/Interface/Curd/ISelect/ISelect0.cs b/FreeSql/Interface/Curd/ISelect/ISelect0.cs index 7a5d6713..ef2602cb 100644 --- a/FreeSql/Interface/Curd/ISelect/ISelect0.cs +++ b/FreeSql/Interface/Curd/ISelect/ISelect0.cs @@ -284,7 +284,8 @@ namespace FreeSql /// PostgreSQL: for update nowait /// Oracle: for update nowait /// Sqlite: 无效果 - /// 达梦: for update nowait + /// 达梦: for update nowait + /// 人大金仓: for update nowait /// /// noawait /// diff --git a/FreeSql/Interface/ICodeFirst.cs b/FreeSql/Interface/ICodeFirst.cs index e0ee5e45..e316be66 100644 --- a/FreeSql/Interface/ICodeFirst.cs +++ b/FreeSql/Interface/ICodeFirst.cs @@ -17,7 +17,7 @@ namespace FreeSql /// bool IsSyncStructureToLower { get; set; } /// - /// 转大写同步结构,适用 Oracle/达梦 + /// 转大写同步结构,适用 Oracle/达梦/人大金仓 /// bool IsSyncStructureToUpper { get; set; } /// diff --git a/readme.md b/readme.md index d4bf0964..e997a53e 100644 --- a/readme.md +++ b/readme.md @@ -16,7 +16,7 @@ FreeSql 是功能强大的对象关系映射技术(O/RM),支持 .NETCore 2.1+ - [x] 支持 丰富的表达式函数,以及灵活的自定义解析; - [x] 支持 导航属性一对多、多对多贪婪加载,以及延时加载; - [x] 支持 读写分离、分表分库、过滤器、乐观锁、悲观锁; -- [x] 支持 MySql/SqlServer/PostgreSQL/Oracle/Sqlite/达梦数据库/Access; +- [x] 支持 MySql/SqlServer/PostgreSQL/Oracle/Sqlite/达梦/人大金仓/Access; ## 📚 Documentation