Browse Source

-

pull/6/head
sunkaixuna 3 years ago
parent
commit
6273da8ab1
  1. 6
      Src/Asp.Net/SqlSugar/Abstract/SqlBuilderProvider/QueryBuilder.cs

6
Src/Asp.Net/SqlSugar/Abstract/SqlBuilderProvider/QueryBuilder.cs

@ -478,11 +478,15 @@ namespace SqlSugar
} }
public string GetSqlQuerySql(string result) public string GetSqlQuerySql(string result)
{ {
var old = result;
if (this.IsSqlQuery && (Skip == null && Take == null)) if (this.IsSqlQuery && (Skip == null && Take == null))
{ {
result = System.Text.RegularExpressions.Regex.Match(result, @"^SELECT .* FROM \(((.|\n|\r)*)\) t $").Groups[1].Value; result = System.Text.RegularExpressions.Regex.Match(result, @"^SELECT .* FROM \(((.|\n|\r)*)\) t $").Groups[1].Value;
} }
if (string.IsNullOrEmpty(result))
{
result = old;
}
return result; return result;
} }
#endregion #endregion

Loading…
Cancel
Save