Update SqlQueryable Regex

This commit is contained in:
sunkaixuna 2021-08-05 20:46:11 +08:00
parent c60a4c3563
commit 01b6d473e0
2 changed files with 4 additions and 1 deletions

View File

@ -66,6 +66,9 @@ namespace OrmTest
var list= db.Ado.SqlQuery<Order>("select * from [order] ");
var intValue=db.Ado.SqlQuerySingle<int>("select 1");
db.Ado.ExecuteCommand("delete [order] where id>1000");
db.SqlQueryable<Custom>(@"select *
from custom").ToList();
//db.Ado.xxx
Console.WriteLine("#### Ado End ####");
}

View File

@ -480,7 +480,7 @@ namespace SqlSugar
{
if (this.IsSqlQuery && (Skip == null && Take == null))
{
result = System.Text.RegularExpressions.Regex.Match(result, @"^SELECT t\.\* FROM \((.*)\) t $").Groups[1].Value;
result = System.Text.RegularExpressions.Regex.Match(result, @"^SELECT .* FROM \(((.|\n|\r)*)\) t $").Groups[1].Value;
}
return result;