dotnetcore / dotnetcore/FreeSql
达梦数据库DM8 能否增加 SetGlobalSelectWithLock、withlock 功能,达梦有 sql后加 with ur 的功能
- Dominant language
- C#
- Stars
- 4.4k
- Forks
- 910
- PR merge metrics
- No merged PRs in 30d
Description
#### Feature 特性
例如类似SqlServer下的类似功能,改成
```c#
//1、全局的 以下代码设置一次
fsql.SetGlobalSelectWithLock(DamengLock.NoLock);
//或者指定类型加锁
fsql.SetGlobalSelectWithLock(DamengLock.NoLock, new Dictionary
{
[typeof(Order)] = true,
[typeof(OrderItem)] = true,
});
// 2、多表查询同时加锁
var sql = orm.Select()
.InnerJoin(a => a.Type.Guid == a.Id)
.WithLock()
.ToSql();
SELECT a.[Id], a.[Clicks], a.[TypeGuid], a__Type.[Guid], a__Type.[ParentId], a__Type.[Name], a.[Title], a.[CreateTime]
FROM [tb_topic22] a
INNER JOIN [TestTypeInfo] a__Type ON a__Type.[Guid] = a.[Id]
With ur
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.