Update subquery.tolist

This commit is contained in:
sunkaixuan 2025-05-21 17:50:22 +08:00
parent 949a2bed34
commit 0d7bdf0286
2 changed files with 3 additions and 3 deletions

View File

@ -29,9 +29,9 @@ namespace SqlSugar
public override string RemoveParentheses(string sql) public override string RemoveParentheses(string sql)
{ {
if (sql.Contains(" Order By ")) if (sql.Contains(" ORDER BY")&&sql.StartsWith("(")&&sql.EndsWith(")") &&!sql.ToLower().Contains("limit"))
{ {
sql = $" SELECT * FROM {sql} MYSQL_UNIONALL_ITEM "; sql = $" {sql.TrimEnd(')')} limit 0,{int.MaxValue}) ";
} }
return sql; return sql;
} }

View File

@ -2,7 +2,7 @@
<package > <package >
<metadata> <metadata>
<id>SqlSugarCore</id> <id>SqlSugarCore</id>
<version>5.1.4.194-preview16</version> <version>5.1.4.194-preview19</version>
<authors>sunkaixuan</authors> <authors>sunkaixuan</authors>
<owners>果糖大数据科技</owners> <owners>果糖大数据科技</owners>
<licenseUrl>http://www.apache.org/licenses/LICENSE-2.0.html</licenseUrl> <licenseUrl>http://www.apache.org/licenses/LICENSE-2.0.html</licenseUrl>