mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-24 18:04:52 +08:00
Synchronization code
This commit is contained in:
parent
55a2ff644e
commit
4f88aae62e
@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace SqlSugar
|
||||
{
|
||||
internal class SubQueryToListDefaultT
|
||||
{
|
||||
public int id { get; set; }
|
||||
public object sugarIndex { get; set; }
|
||||
}
|
||||
}
|
@ -1778,6 +1778,12 @@ namespace SqlSugar
|
||||
isFirst = true;
|
||||
}
|
||||
var sqlstring = string.Join(" \r\n UNION ALL ", sqls);
|
||||
if (callType?.IsClass() == false)
|
||||
{
|
||||
Regex regex = new Regex(@"\,\d{1,10} as sugarIndex");
|
||||
sqlstring = regex.Replace(sqlstring, it=> (" as id " + it.Value));
|
||||
callType = typeof(SubQueryToListDefaultT);
|
||||
}
|
||||
var methodParamters = new object[] { sqlstring, ps.ToArray() };
|
||||
this.QueryBuilder.SubToListParameters = null;
|
||||
this.QueryBuilder.AppendColumns = new List<QueryableAppendColumn>() {
|
||||
@ -1818,6 +1824,10 @@ namespace SqlSugar
|
||||
if (appValue[0].Value.ObjToInt() == i)
|
||||
{
|
||||
var addItem = list[appindex];
|
||||
if (addItem is SubQueryToListDefaultT)
|
||||
{
|
||||
addItem = (addItem as SubQueryToListDefaultT).id;
|
||||
}
|
||||
setValue.Add(addItem);
|
||||
}
|
||||
appindex++;
|
||||
@ -1899,6 +1909,10 @@ namespace SqlSugar
|
||||
if (appValue[0].Value.ObjToInt() == resIndex)
|
||||
{
|
||||
var addItem = list[appindex];
|
||||
if (addItem is SubQueryToListDefaultT)
|
||||
{
|
||||
addItem= ((SubQueryToListDefaultT)addItem).id;
|
||||
}
|
||||
setValue.Add(addItem);
|
||||
}
|
||||
appindex++;
|
||||
|
@ -176,7 +176,7 @@ namespace SqlSugar
|
||||
return new List<T>();
|
||||
}
|
||||
|
||||
public List<TResult> ToList<TResult>(Func<T, TResult> selector) where TResult:class,new()
|
||||
public List<TResult> ToList<TResult>(Func<T, TResult> selector)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
@ -119,6 +119,7 @@
|
||||
<Compile Include="Abstract\InsertableProvider\InsertMethodInfo.cs" />
|
||||
<Compile Include="Abstract\QueryableProvider\Entities\QueryableAppendColumn.cs" />
|
||||
<Compile Include="Abstract\QueryableProvider\Entities\SqlInfo.cs" />
|
||||
<Compile Include="Abstract\QueryableProvider\Entities\SubQueryToListDefaultT.cs" />
|
||||
<Compile Include="Abstract\QueryableProvider\QueryableExecuteSqlAsync.cs" />
|
||||
<Compile Include="Abstract\QueryableProvider\QueryableExecuteSql.cs" />
|
||||
<Compile Include="Abstract\QueryableProvider\QueryableProperties.cs" />
|
||||
|
Loading…
Reference in New Issue
Block a user