code optimization

This commit is contained in:
sunkaixuna
2021-08-05 21:16:33 +08:00
parent 6273da8ab1
commit 73d14f0437

View File

@@ -482,10 +482,10 @@ namespace SqlSugar
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))
if (string.IsNullOrEmpty(result)) {
{ result = old;
result = old; }
} }
return result; return result;
} }