mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-07-31 15:56:25 +08:00
Synchronization code
This commit is contained in:
parent
154092f60d
commit
8bc3b0e75d
@ -1076,7 +1076,7 @@ namespace SqlSugar
|
||||
{
|
||||
var dbColumnName = firstColumn.DbColumnName;
|
||||
var AsName = item.PropertyName;
|
||||
sb.Append($"{this.SqlBuilder.GetTranslationColumnName(dbColumnName)} AS {AsName} ,");
|
||||
sb.Append($"{this.SqlBuilder.GetTranslationColumnName(dbColumnName)} AS {this.SqlBuilder.GetTranslationColumnName(AsName)} ,");
|
||||
}
|
||||
}
|
||||
selects = sb.ToString().TrimEnd(',');
|
||||
@ -2588,6 +2588,10 @@ namespace SqlSugar
|
||||
{
|
||||
result.WithCache(this.CacheTime);
|
||||
}
|
||||
if (this.QueryBuilder.IsSqlQuery)
|
||||
{
|
||||
this.QueryBuilder.IsSqlQuerySelect = true;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
protected void _Where(Expression expression)
|
||||
@ -3546,6 +3550,7 @@ namespace SqlSugar
|
||||
asyncQueryableBuilder.DisableTop = this.QueryBuilder.DisableTop;
|
||||
asyncQueryableBuilder.Offset = this.QueryBuilder.Offset;
|
||||
asyncQueryableBuilder.IsSqlQuery = this.QueryBuilder.IsSqlQuery;
|
||||
asyncQueryableBuilder.IsSqlQuerySelect = this.QueryBuilder.IsSqlQuerySelect;
|
||||
asyncQueryableBuilder.OldSql = this.QueryBuilder.OldSql;
|
||||
}
|
||||
protected int SetCacheTime(int cacheDurationInSeconds)
|
||||
|
@ -42,6 +42,7 @@ namespace SqlSugar
|
||||
public List<string> IgnoreColumns { get; set; }
|
||||
public bool IsCount { get; set; }
|
||||
public bool IsSqlQuery { get; set; }
|
||||
public bool IsSqlQuerySelect { get; set; }
|
||||
public int? Skip { get; set; }
|
||||
public int ExternalPageIndex { get; set; }
|
||||
public int ExternalPageSize { get; set; }
|
||||
@ -557,6 +558,10 @@ namespace SqlSugar
|
||||
result = "-- No table ";
|
||||
return result;
|
||||
}
|
||||
if (this.IsSqlQuerySelect == true)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
if (this.IsSqlQuery&&this.OldSql.HasValue() && (Skip == null && Take == null) && (this.WhereInfos == null || this.WhereInfos.Count == 0))
|
||||
{
|
||||
return this.OldSql;
|
||||
|
Loading…
Reference in New Issue
Block a user