mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-22 12:09:29 +08:00
Synchronization code
This commit is contained in:
@@ -361,16 +361,6 @@ namespace SqlSugar
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public new virtual ISugarQueryable<T, T2> GroupByIF(bool isGroupBy, string groupFields)
|
||||
{
|
||||
if (isGroupBy)
|
||||
{
|
||||
GroupBy(groupFields);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public new virtual ISugarQueryable<T, T2> HavingIF(bool isHaving, Expression<Func<T, bool>> expression)
|
||||
{
|
||||
if (isHaving)
|
||||
@@ -865,16 +855,6 @@ namespace SqlSugar
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public new virtual ISugarQueryable<T, T2, T3> GroupByIF(bool isGroupBy, string groupFields)
|
||||
{
|
||||
if (isGroupBy)
|
||||
{
|
||||
GroupBy(groupFields);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public ISugarQueryable<T, T2, T3> GroupBy(Expression<Func<T, T2, T3, object>> expression)
|
||||
{
|
||||
_GroupBy(expression);
|
||||
@@ -1783,16 +1763,6 @@ namespace SqlSugar
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public new virtual ISugarQueryable<T, T2, T3, T4> GroupByIF(bool isGroupBy, string groupFields)
|
||||
{
|
||||
if (isGroupBy)
|
||||
{
|
||||
GroupBy(groupFields);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public new ISugarQueryable<T, T2, T3, T4> GroupBy(Expression<Func<T, object>> expression)
|
||||
{
|
||||
_GroupBy(expression);
|
||||
|
@@ -14,6 +14,14 @@ namespace SqlSugar
|
||||
|
||||
public IEnumerable<SplitTableInfo> Tables { get; set; }
|
||||
|
||||
public int ExecuteCommandWithOptLock(bool isThrowError = false)
|
||||
{
|
||||
var updates=updateobj.UpdateObjs;
|
||||
var tableName = this.Context.SplitHelper(updates.FirstOrDefault()).GetTableName();
|
||||
var names=updateobj.UpdateBuilder.DbColumnInfoList.Select(it => it.DbColumnName).Distinct().ToArray();
|
||||
return this.Context.Updateable(updates).AS(tableName)
|
||||
.UpdateColumns(names).ExecuteCommandWithOptLock(isThrowError);
|
||||
}
|
||||
public int ExecuteCommand()
|
||||
{
|
||||
if (this.Context.Ado.Transaction == null)
|
||||
@@ -36,6 +44,14 @@ namespace SqlSugar
|
||||
return _ExecuteCommand();
|
||||
}
|
||||
}
|
||||
public async Task<int> ExecuteCommandWithOptLockAsync(bool isThrowError = false)
|
||||
{
|
||||
var updates = updateobj.UpdateObjs;
|
||||
var tableName = this.Context.SplitHelper(updates.FirstOrDefault()).GetTableName();
|
||||
var names = updateobj.UpdateBuilder.DbColumnInfoList.Select(it => it.DbColumnName).Distinct().ToArray();
|
||||
return await this.Context.Updateable(updates).AS(tableName)
|
||||
.UpdateColumns(names).ExecuteCommandWithOptLockAsync(isThrowError);
|
||||
}
|
||||
public async Task<int> ExecuteCommandAsync()
|
||||
{
|
||||
if (this.Context.Ado.Transaction == null)
|
||||
|
Reference in New Issue
Block a user