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