mirror of
https://github.com/dotnetcore/FreeSql.git
synced 2026-02-27 18:50:55 +08:00
@@ -12,7 +12,7 @@
|
||||
<!--
|
||||
经常出于版本交叉问题,暂时关闭,在每个项目上设置版本号
|
||||
<PropertyGroup>
|
||||
<Version>3.5.103-preview20241205</Version>
|
||||
<Version>3.5.105-preview20250116</Version>
|
||||
</PropertyGroup>
|
||||
-->
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using FreeSql;
|
||||
using FreeSql.DataAnnotations;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
@@ -76,4 +77,7 @@ public class IdentityTable
|
||||
public int id { get; set; }
|
||||
|
||||
public string name { get; set; }
|
||||
|
||||
[JsonProperty, Column(DbType = "datetime")]
|
||||
public DateTime? create_time { get; set; }
|
||||
}
|
||||
@@ -9,7 +9,6 @@ using FreeSql.Internal.Model;
|
||||
using FreeSql.Odbc.Default;
|
||||
using MessagePack;
|
||||
using Microsoft.Data.SqlClient;
|
||||
using MySqlConnector;
|
||||
using NetTopologySuite.Geometries;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
@@ -523,6 +522,8 @@ namespace base_entity
|
||||
|
||||
static void Main(string[] args)
|
||||
{
|
||||
var ddultval = typeof(System.Text.Json.Nodes.JsonArray).CreateInstanceGetDefaultValue();
|
||||
|
||||
var pams = new Dictionary<string, string>();
|
||||
var sql2rscs = Utils.ReplaceSqlConstString("'', 'SARTEN ACERO VITR.18CM''''GRAFIT''''', 'a",
|
||||
pams, "@lantin1");
|
||||
@@ -577,7 +578,7 @@ namespace base_entity
|
||||
.UseConnectionString(FreeSql.DataType.Firebird, @"database=localhost:D:\fbdata\EXAMPLES.fdb;user=sysdba;password=123456;max pool size=5")
|
||||
//.UseQuoteSqlName(false)
|
||||
|
||||
//.UseConnectionString(FreeSql.DataType.MySql, "Data Source=127.0.0.1;Port=3306;User ID=root;Password=root;Initial Catalog=cccddd;Charset=utf8;SslMode=none;min pool size=1;Max pool size=3;AllowLoadLocalInfile=true")
|
||||
.UseConnectionString(FreeSql.DataType.MySql, "Data Source=127.0.0.1;Port=3306;User ID=root;Password=root;Initial Catalog=cccddd;Charset=utf8;SslMode=none;min pool size=1;Max pool size=3;AllowLoadLocalInfile=true")
|
||||
|
||||
//.UseConnectionString(FreeSql.DataType.SqlServer, "Data Source=.;Integrated Security=True;Initial Catalog=freesqlTest;Pooling=true;Max Pool Size=3;TrustServerCertificate=true")
|
||||
//.UseAdoConnectionPool(false)
|
||||
@@ -619,6 +620,76 @@ namespace base_entity
|
||||
BaseEntity.Initialization(fsql, () => _asyncUow.Value);
|
||||
#endregion
|
||||
|
||||
var res = fsql.Select<MemberActionDayCountModel>()
|
||||
.Where(x => x.Date >= 20230101 && x.Date < 20240101 && x.ScanCode > 0)
|
||||
.Where(x =>
|
||||
fsql.Select<MemberActionDayCountModel>()
|
||||
.Where(a => a.Date >= 20220101 && a.Date < 20230101 && a.ScanCode > 0)
|
||||
.Distinct()
|
||||
.ToList(a => a.MemberId)
|
||||
.Contains(x.MemberId)
|
||||
)
|
||||
.ToAggregateAsync(x => new
|
||||
{
|
||||
MemberCount = x.Count(),
|
||||
ScanSum = x.Sum(x.Key.ScanCode)
|
||||
});
|
||||
|
||||
var p_0 = "x1";
|
||||
var p_0r1 = fsql.Select<User1>().Where(a => a.Nickname == p_0)
|
||||
.GroupBy(a => a.GroupId)
|
||||
.WithTempQuery(a => new
|
||||
{
|
||||
GroupId = a.Key,
|
||||
Sum = fsql.Select<UserGroup>()
|
||||
.Where(b => b.Id == a.Key && b.GroupName == p_0)
|
||||
.Sum(b => b.Id)
|
||||
})
|
||||
.ToList();
|
||||
|
||||
fsql.Delete<RequestEntity>().Where("1=1").ExecuteAffrows();
|
||||
fsql.Delete<RequestDetailEntity>().Where("1=1").ExecuteAffrows();
|
||||
fsql.Insert(new RequestEntity
|
||||
{
|
||||
ID = 21968,
|
||||
AddDate = DateTime.Now,
|
||||
ApproveDate = DateTime.Now,
|
||||
}).ExecuteAffrows();
|
||||
fsql.Insert(new RequestDetailEntity
|
||||
{
|
||||
ID = 55377,
|
||||
RequestID = 21968,
|
||||
OutboundDate = DateTime.Now,
|
||||
}).ExecuteAffrows();
|
||||
// 1.联表, 主表id查询,返回RequestEntity,AddDate不为null
|
||||
var aaa = fsql.Select<RequestEntity, RequestDetailEntity>()
|
||||
.LeftJoin((a, b) => a.ID == b.RequestID)
|
||||
.Where((a, b) => a.ID == 21968)
|
||||
.ToList();
|
||||
|
||||
// 2.联表, 相同的主表ID,AddDate为null, 子表的OutboundDate也为null
|
||||
var bbb = fsql.Select<RequestEntity, RequestDetailEntity>()
|
||||
.LeftJoin((a, b) => a.ID == b.RequestID)
|
||||
.Where((a, b) => a.ID == 21968)
|
||||
.ToList((a, b) => new
|
||||
{
|
||||
a.ID,
|
||||
DetailID = b.ID,
|
||||
a.AddDate,
|
||||
b.OutboundDate,
|
||||
});
|
||||
|
||||
// 3.单表, 以上相同的子表id, OutboundDate 不为null
|
||||
var data = fsql.Select<RequestDetailEntity>()
|
||||
.Where(a => a.ID == 55377)
|
||||
.ToList();
|
||||
|
||||
fsql.Delete<IdentityTable>().Where("1=1").ExecuteAffrows();
|
||||
fsql.Insert(new IdentityTable { name = "name01", create_time = DateTime.Now }).ExecuteAffrows();
|
||||
var itrt01 = fsql.Select<IdentityTable>().ToList();
|
||||
var itrt02 = fsql.Select<IdentityTable>().ToList(a => a.create_time);
|
||||
var itrt03 = fsql.Select<IdentityTable>().ToList(a => new { a.create_time });
|
||||
|
||||
fsql.CodeFirst.SyncStructure<Account>();
|
||||
|
||||
|
||||
@@ -864,22 +935,22 @@ namespace base_entity
|
||||
})
|
||||
.ToSql();
|
||||
Console.WriteLine(list0x1sql);
|
||||
var sql1c2 = fsql.Select<User1>()
|
||||
.GroupBy(a => new { a.Nickname, a.Avatar })
|
||||
.WithTempQuery(b => new
|
||||
{
|
||||
sum = b.Sum(b.Value.Sort),
|
||||
b.Key.Nickname,
|
||||
b.Key.Avatar,
|
||||
})
|
||||
.OrderByDescending(arg => arg.sum)
|
||||
.ToSql(arg => new
|
||||
{
|
||||
str1 = string.Concat(arg.Nickname, '-', arg.Avatar, '-'),
|
||||
str2 = string.Concat(arg.Nickname, '-', arg.Avatar)
|
||||
}); //报错 多括号
|
||||
//.ToOne(arg => string.Concat(arg.Nickname, '-', arg.Avatar)); //正常
|
||||
Console.WriteLine(sql1c2);
|
||||
//var sql1c2 = fsql.Select<User1>()
|
||||
// .GroupBy(a => new { a.Nickname, a.Avatar })
|
||||
// .WithTempQuery(b => new
|
||||
// {
|
||||
// sum = b.Sum(b.Value.Sort),
|
||||
// b.Key.Nickname,
|
||||
// b.Key.Avatar,
|
||||
// })
|
||||
// .OrderByDescending(arg => arg.sum)
|
||||
// .ToSql(arg => new
|
||||
// {
|
||||
// str1 = string.Concat(arg.Nickname, '-', arg.Avatar, '-'),
|
||||
// str2 = string.Concat(arg.Nickname, '-', arg.Avatar)
|
||||
// }); //报错 多括号
|
||||
// //.ToOne(arg => string.Concat(arg.Nickname, '-', arg.Avatar)); //正常
|
||||
//Console.WriteLine(sql1c2);
|
||||
|
||||
//var clickhouseSql1 = fsql.Select<User1>().Where(a => new[] { 1, 2, 3 }.Contains(a.GroupId)).ToSql();
|
||||
// var clickhouseVal1 = new[] { 1, 2, 3 };
|
||||
@@ -1413,9 +1484,9 @@ var sql11111 = fsql.Select<Class1111>()
|
||||
//});
|
||||
fsql.Insert(Enumerable.Range(0, 100).Select(a => new User1 { Id = Guid.NewGuid(), Nickname = $"nickname{a}", Username = $"username{a}", Description = $"desc{a}" }).ToArray()).ExecuteAffrows();
|
||||
|
||||
fsql.InsertOrUpdate<User1>()
|
||||
.SetSource(fsql.Select<User1>().ToList())
|
||||
.ExecuteMySqlBulkCopy();
|
||||
//fsql.InsertOrUpdate<User1>()
|
||||
// .SetSource(fsql.Select<User1>().ToList())
|
||||
// .ExecuteMySqlBulkCopy();
|
||||
|
||||
var updatejoin01 = fsql.Update<User1>()
|
||||
.Join(fsql.Select<UserGroup>(), (a, b) => a.GroupId == b.Id)
|
||||
@@ -3348,4 +3419,95 @@ class TableOptions
|
||||
{
|
||||
public int Value1 { get; set; }
|
||||
public string Value2 { get; set; }
|
||||
}
|
||||
|
||||
[Table(Name = "tb_request_detail")]
|
||||
public class RequestDetailEntity
|
||||
{
|
||||
[Column(IsPrimary = true)]
|
||||
public int ID { get; set; }
|
||||
|
||||
[Column(IsNullable = false)]
|
||||
public int RequestID { get; set; }
|
||||
|
||||
[JsonProperty]
|
||||
public DateTime? OutboundDate { get; set; }
|
||||
}
|
||||
|
||||
|
||||
[Table(Name = "tb_request")]
|
||||
public class RequestEntity
|
||||
{
|
||||
[Column(IsPrimary = true, Position = 1)]
|
||||
public int ID { get; set; }
|
||||
|
||||
[Column(Position = -2, IsNullable = false, DbType = "datetime")]
|
||||
public DateTime? AddDate { get; set; }
|
||||
|
||||
[Column(IsNullable = true, Position = 71)]
|
||||
public DateTime? ApproveDate { get; set; }
|
||||
}
|
||||
public sealed class MemberActionDayCountModel
|
||||
{
|
||||
#region properties
|
||||
/// <summary>
|
||||
/// MemberId
|
||||
/// </summary>
|
||||
[Column(IsPrimary = true)] public long MemberId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 日期
|
||||
/// </summary>
|
||||
[Column(IsPrimary = true)] public int Date { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 所有活动
|
||||
/// </summary>
|
||||
public int Activity { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 线上活动
|
||||
/// </summary>
|
||||
public int OnlineActivity { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 线下活动
|
||||
/// </summary>
|
||||
public int OfflineActivity { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 线下活动中的品鉴会
|
||||
/// </summary>
|
||||
public int Pinjianhui { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 线下活动中的回场游
|
||||
/// </summary>
|
||||
public int Huichangyou { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 所有订单
|
||||
/// </summary>
|
||||
public int Form { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 所有订单金额
|
||||
/// </summary>
|
||||
public decimal FormAmount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 订单中的积分订单
|
||||
/// </summary>
|
||||
public int IntegralForm { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 所有扫码
|
||||
/// </summary>
|
||||
public int ScanCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 所有扫码金额
|
||||
/// </summary>
|
||||
public decimal ScanCodeAmount { get; set; }
|
||||
#endregion
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Confluent.Kafka" Version="2.2.0" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||
<PackageReference Include="MessagePack" Version="2.4.35" />
|
||||
<PackageReference Include="MessagePack" Version="3.1.1" />
|
||||
<PackageReference Include="SQLitePCLRaw.bundle_e_sqlite3" Version="2.1.5" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<ProjectReference Include="..\..\Providers\FreeSql.Provider.ClickHouse\FreeSql.Provider.ClickHouse.csproj" />
|
||||
<ProjectReference Include="..\..\Providers\FreeSql.Provider.Dameng\FreeSql.Provider.Dameng.csproj" />
|
||||
<ProjectReference Include="..\..\Providers\FreeSql.Provider.Firebird\FreeSql.Provider.Firebird.csproj" />
|
||||
<ProjectReference Include="..\..\Providers\FreeSql.Provider.MySqlConnector\FreeSql.Provider.MySqlConnector.csproj" />
|
||||
<ProjectReference Include="..\..\Providers\FreeSql.Provider.MySql\FreeSql.Provider.MySql.csproj" />
|
||||
<ProjectReference Include="..\..\Providers\FreeSql.Provider.Odbc\FreeSql.Provider.Odbc.csproj" />
|
||||
<ProjectReference Include="..\..\Providers\FreeSql.Provider.Oracle\FreeSql.Provider.Oracle.csproj" />
|
||||
<ProjectReference Include="..\..\Providers\FreeSql.Provider.PostgreSQL\FreeSql.Provider.PostgreSQL.csproj" />
|
||||
@@ -41,9 +41,6 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="DmProvider">
|
||||
<HintPath>..\..\Providers\FreeSql.Provider.Dameng\lib\DmProvider\netstandard2.0\DmProvider.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="XuguClient">
|
||||
<HintPath>..\..\Providers\FreeSql.Provider.Xugu\lib\XuguClient\netstandard2.0\XuguClient.dll</HintPath>
|
||||
</Reference>
|
||||
|
||||
@@ -336,6 +336,66 @@
|
||||
账户
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:MemberActionDayCountModel.MemberId">
|
||||
<summary>
|
||||
MemberId
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:MemberActionDayCountModel.Date">
|
||||
<summary>
|
||||
日期
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:MemberActionDayCountModel.Activity">
|
||||
<summary>
|
||||
所有活动
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:MemberActionDayCountModel.OnlineActivity">
|
||||
<summary>
|
||||
线上活动
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:MemberActionDayCountModel.OfflineActivity">
|
||||
<summary>
|
||||
线下活动
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:MemberActionDayCountModel.Pinjianhui">
|
||||
<summary>
|
||||
线下活动中的品鉴会
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:MemberActionDayCountModel.Huichangyou">
|
||||
<summary>
|
||||
线下活动中的回场游
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:MemberActionDayCountModel.Form">
|
||||
<summary>
|
||||
所有订单
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:MemberActionDayCountModel.FormAmount">
|
||||
<summary>
|
||||
所有订单金额
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:MemberActionDayCountModel.IntegralForm">
|
||||
<summary>
|
||||
订单中的积分订单
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:MemberActionDayCountModel.ScanCode">
|
||||
<summary>
|
||||
所有扫码
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:MemberActionDayCountModel.ScanCodeAmount">
|
||||
<summary>
|
||||
所有扫码金额
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:EMSServerModel.Model.Role">
|
||||
<summary>
|
||||
角色表
|
||||
@@ -501,5 +561,11 @@
|
||||
用户导航
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:MessagePack.GeneratedMessagePackResolver">
|
||||
<summary>A MessagePack resolver that uses generated formatters for types in this assembly.</summary>
|
||||
</member>
|
||||
<member name="F:MessagePack.GeneratedMessagePackResolver.Instance">
|
||||
<summary>An instance of this resolver that only returns formatters specifically generated for types in this assembly.</summary>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>key.snk</AssemblyOriginatorKeyFile>
|
||||
<DelaySign>false</DelaySign>
|
||||
<Version>3.5.103-preview20241205</Version>
|
||||
<Version>3.5.105-preview20250116</Version>
|
||||
<PackageReadmeFile>readme.md</PackageReadmeFile>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<AssemblyOriginatorKeyFile>key.snk</AssemblyOriginatorKeyFile>
|
||||
<DelaySign>false</DelaySign>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<Version>3.5.103-preview20241205</Version>
|
||||
<Version>3.5.105-preview20250116</Version>
|
||||
<PackageReadmeFile>readme.md</PackageReadmeFile>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>key.snk</AssemblyOriginatorKeyFile>
|
||||
<DelaySign>false</DelaySign>
|
||||
<Version>3.5.103-preview20241205</Version>
|
||||
<Version>3.5.105-preview20250116</Version>
|
||||
<PackageReadmeFile>readme.md</PackageReadmeFile>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<Title>$(AssemblyName)</Title>
|
||||
<IsPackable>true</IsPackable>
|
||||
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
|
||||
<Version>3.5.103-preview20241205</Version>
|
||||
<Version>3.5.105-preview20250116</Version>
|
||||
<PackageReadmeFile>readme.md</PackageReadmeFile>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>key.snk</AssemblyOriginatorKeyFile>
|
||||
<DelaySign>false</DelaySign>
|
||||
<Version>3.5.103-preview20241205</Version>
|
||||
<Version>3.5.105-preview20250116</Version>
|
||||
<PackageReadmeFile>readme.md</PackageReadmeFile>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>key.snk</AssemblyOriginatorKeyFile>
|
||||
<DelaySign>false</DelaySign>
|
||||
<Version>3.5.103-preview20241205</Version>
|
||||
<Version>3.5.105-preview20250116</Version>
|
||||
<PackageReadmeFile>readme.md</PackageReadmeFile>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<PackageProjectUrl>https://github.com/2881099/FreeSql</PackageProjectUrl>
|
||||
<RepositoryUrl>https://github.com/2881099/FreeSql</RepositoryUrl>
|
||||
<PackageTags>FreeSql DbFirst 实体生成器</PackageTags>
|
||||
<Version>3.5.103-preview20241205</Version>
|
||||
<Version>3.5.105-preview20250116</Version>
|
||||
<PackageReadmeFile>readme.md</PackageReadmeFile>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>key.snk</AssemblyOriginatorKeyFile>
|
||||
<DelaySign>false</DelaySign>
|
||||
<Version>3.5.103-preview20241205</Version>
|
||||
<Version>3.5.105-preview20250116</Version>
|
||||
<PackageReadmeFile>readme.md</PackageReadmeFile>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>key.snk</AssemblyOriginatorKeyFile>
|
||||
<DelaySign>false</DelaySign>
|
||||
<Version>3.5.103-preview20241205</Version>
|
||||
<Version>3.5.105-preview20250116</Version>
|
||||
<PackageReadmeFile>readme.md</PackageReadmeFile>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>key.snk</AssemblyOriginatorKeyFile>
|
||||
<DelaySign>false</DelaySign>
|
||||
<Version>3.5.103-preview20241205</Version>
|
||||
<Version>3.5.105-preview20250116</Version>
|
||||
<PackageReadmeFile>readme.md</PackageReadmeFile>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
@@ -169,12 +169,12 @@ public static partial class FreeSqlGlobalExtensions
|
||||
if (that == typeof(byte[])) return default(byte[]);
|
||||
if (that.IsArray) return Array.CreateInstance(that.GetElementType(), 0);
|
||||
if (that.IsInterface || that.IsAbstract) return null;
|
||||
var ctorParms = that.InternalGetTypeConstructor0OrFirst(false)?.GetParameters();
|
||||
var ctor = that.InternalGetTypeConstructor0OrFirst(false);
|
||||
var ctorParms = ctor?.GetParameters();
|
||||
if (ctorParms == null || ctorParms.Any() == false) return Activator.CreateInstance(that, true);
|
||||
return Activator.CreateInstance(that, ctorParms
|
||||
.Select(a => a.ParameterType.IsInterface || a.ParameterType.IsAbstract || a.ParameterType == typeof(string) || a.ParameterType.IsArray ?
|
||||
null :
|
||||
Activator.CreateInstance(a.ParameterType, null)).ToArray());
|
||||
var ctorArgs = ctorParms.Select(a => a.ParameterType.IsInterface || a.ParameterType.IsAbstract || a.ParameterType == typeof(string) || a.ParameterType.IsArray ?
|
||||
null : Activator.CreateInstance(a.ParameterType, null)).ToArray();
|
||||
return ctor.Invoke(ctorArgs);
|
||||
}
|
||||
internal static NewExpression InternalNewExpression(this Type that)
|
||||
{
|
||||
@@ -186,13 +186,10 @@ public static partial class FreeSqlGlobalExtensions
|
||||
internal static ConstructorInfo InternalGetTypeConstructor0OrFirst(this Type that, bool isThrow = true)
|
||||
{
|
||||
var ret = _dicInternalGetTypeConstructor0OrFirst.GetOrAdd(that, tp =>
|
||||
new Lazy<ConstructorInfo>(() =>
|
||||
{
|
||||
return tp.GetConstructor(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic, null, new Type[0], null) ??
|
||||
tp.GetConstructors(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic)
|
||||
.OrderBy(a => a.IsPublic ? 0 : 1)
|
||||
.FirstOrDefault();
|
||||
}));
|
||||
new Lazy<ConstructorInfo>(() => tp.GetConstructor(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic, null, new Type[0], null) ??
|
||||
tp.GetConstructors(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic)
|
||||
.OrderBy(a => a.IsPublic ? 0 : 1)
|
||||
.FirstOrDefault()));
|
||||
if (ret.Value == null && isThrow) throw new ArgumentException(CoreErrorStrings.Type_Cannot_Access_Constructor(that.FullName));
|
||||
return ret.Value;
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>key.snk</AssemblyOriginatorKeyFile>
|
||||
<DelaySign>false</DelaySign>
|
||||
<Version>3.5.103-preview20241205</Version>
|
||||
<Version>3.5.105-preview20250116</Version>
|
||||
<PackageReadmeFile>readme.md</PackageReadmeFile>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -30,14 +30,6 @@
|
||||
<Service Include="{508349b6-6b84-4df5-91f0-309beebad82d}" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Update="Internal\CommonProvider\SelectProvider\Select1Provider2`16.cs">
|
||||
<DependentUpon>Select1Provider2`16.tt</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
<AutoGen>True</AutoGen>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="Internal\CommonProvider\SelectProvider\T4Temp\ISelect2`16.tt">
|
||||
<Generator>TextTemplatingFileGenerator</Generator>
|
||||
|
||||
@@ -1087,93 +1087,6 @@
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:FreeSql.Extensions.DynamicEntity.DynamicCompileBuilder">
|
||||
<summary>
|
||||
动态创建实体类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:FreeSql.Extensions.DynamicEntity.DynamicCompileBuilder.#ctor(IFreeSql,System.String,System.Attribute[])">
|
||||
<summary>
|
||||
配置Class
|
||||
</summary>
|
||||
<param name="className">类名</param>
|
||||
<param name="attributes">类标记的特性[Table(Name = "xxx")] [Index(xxxx)]</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="P:FreeSql.Extensions.DynamicEntity.DynamicCompileBuilder.TypeBuilder">
|
||||
<summary>
|
||||
获取类型构建器,可作为要构建的Type来引用
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:FreeSql.Extensions.DynamicEntity.DynamicCompileBuilder.Property(System.String,System.Type,System.Attribute[])">
|
||||
<summary>
|
||||
配置属性
|
||||
</summary>
|
||||
<param name="propertyName">属性名称</param>
|
||||
<param name="propertyType">属性类型</param>
|
||||
<param name="attributes">属性标记的特性-支持多个</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:FreeSql.Extensions.DynamicEntity.DynamicCompileBuilder.Property(System.String,System.Type,System.Boolean,System.Attribute[])">
|
||||
<summary>
|
||||
配置属性
|
||||
</summary>
|
||||
<param name="propertyName">属性名称</param>
|
||||
<param name="propertyType">属性类型</param>
|
||||
<param name="isOverride">该属性是否重写父类属性</param>
|
||||
<param name="attributes">属性标记的特性-支持多个</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:FreeSql.Extensions.DynamicEntity.DynamicCompileBuilder.Property(System.String,System.Type,System.Boolean,System.Object,System.Attribute[])">
|
||||
<summary>
|
||||
配置属性
|
||||
</summary>
|
||||
<param name="propertyName">属性名称</param>
|
||||
<param name="propertyType">属性类型</param>
|
||||
<param name="isOverride">该属性是否重写父类属性</param>
|
||||
<param name="defaultValue">属性默认值</param>
|
||||
<param name="attributes">属性标记的特性-支持多个</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:FreeSql.Extensions.DynamicEntity.DynamicCompileBuilder.Extend(System.Type)">
|
||||
<summary>
|
||||
配置父类
|
||||
</summary>
|
||||
<param name="superClass">父类类型</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:FreeSql.Extensions.DynamicEntity.DynamicCompileBuilder.OverrideProperty(System.Reflection.Emit.TypeBuilder@,System.Reflection.Emit.MethodBuilder,FreeSql.Extensions.DynamicEntity.DynamicCompileBuilder.PropertyMethodEnum,System.String)">
|
||||
<summary>
|
||||
Override属性
|
||||
</summary>
|
||||
<param name="typeBuilder"></param>
|
||||
</member>
|
||||
<member name="M:FreeSql.Extensions.DynamicEntity.DynamicCompileBuilder.Build">
|
||||
<summary>
|
||||
Emit动态创建出Class - Type
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:FreeSql.Extensions.DynamicEntity.DynamicCompileBuilder.BuildJustType">
|
||||
<summary>
|
||||
Emit动态创建出Class - Type,不附带获取TableInfo
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:FreeSql.Extensions.DynamicEntity.DynamicCompileBuilder.FirstCharToLower(System.String)">
|
||||
<summary>
|
||||
首字母小写
|
||||
</summary>
|
||||
<param name="input"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:FreeSql.Extensions.DynamicEntity.DynamicCompileBuilder.FirstCharToUpper(System.String)">
|
||||
<summary>
|
||||
首字母大写
|
||||
</summary>
|
||||
<param name="input"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:FreeSql.Extensions.EntityUtil.EntityUtilExtensions.GetEntityKeyString(IFreeSql,System.Type,System.Object,System.Boolean,System.String)">
|
||||
<summary>
|
||||
获取实体的主键值,以 "*|_,[,_|*" 分割,当任意一个主键属性无值时,返回 ""
|
||||
@@ -3376,13 +3289,6 @@
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:FreeSql.IUpdate`1.ExecuteUpdatedAsync(System.Threading.CancellationToken)">
|
||||
<summary>
|
||||
执行SQL语句,返回更新后的记录<para></para>
|
||||
注意:此方法只有 Postgresql/SqlServer 有效果
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:FreeSql.IUpdateJoin`2.WithTransaction(System.Data.Common.DbTransaction)">
|
||||
<summary>
|
||||
指定事务对象
|
||||
@@ -3727,177 +3633,6 @@
|
||||
<param name="parms"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:FreeSql.IAdo.ExecuteConnectTestAsync(System.Int32,System.Threading.CancellationToken)">
|
||||
<summary>
|
||||
测试数据库是否连接正确,本方法执行如下命令:<para></para>
|
||||
MySql/SqlServer/PostgreSQL/达梦/人大金仓/神通: SELECT 1<para></para>
|
||||
Oracle: SELECT 1 FROM dual<para></para>
|
||||
</summary>
|
||||
<param name="commandTimeout">命令超时设置(秒)</param>
|
||||
<param name="cancellationToken"></param>
|
||||
<returns>true: 成功, false: 失败</returns>
|
||||
</member>
|
||||
<member name="M:FreeSql.IAdo.ExecuteReaderAsync(System.Func{FreeSql.Internal.Model.FetchCallbackArgs{System.Data.Common.DbDataReader},System.Threading.Tasks.Task},System.Data.CommandType,System.String,System.Data.Common.DbParameter[],System.Threading.CancellationToken)">
|
||||
<summary>
|
||||
查询,若使用读写分离,查询【从库】条件cmdText.StartsWith("SELECT "),否则查询【主库】
|
||||
</summary>
|
||||
<param name="readerHander"></param>
|
||||
<param name="cmdType"></param>
|
||||
<param name="cmdText"></param>
|
||||
<param name="cmdParms"></param>
|
||||
<param name="cancellationToken"></param>
|
||||
</member>
|
||||
<member name="M:FreeSql.IAdo.ExecuteReaderAsync(System.Func{FreeSql.Internal.Model.FetchCallbackArgs{System.Data.Common.DbDataReader},System.Threading.Tasks.Task},System.String,System.Object,System.Threading.CancellationToken)">
|
||||
<summary>
|
||||
查询,ExecuteReaderAsync(dr => {}, "select * from user where age > @age", new { age = 25 })<para></para>
|
||||
提示:parms 参数还可以传 Dictionary<string, object>
|
||||
</summary>
|
||||
<param name="readerHander"></param>
|
||||
<param name="cmdText"></param>
|
||||
<param name="parms"></param>
|
||||
<param name="cancellationToken"></param>
|
||||
</member>
|
||||
<member name="M:FreeSql.IAdo.ExecuteArrayAsync(System.Data.CommandType,System.String,System.Data.Common.DbParameter[],System.Threading.CancellationToken)">
|
||||
<summary>
|
||||
查询
|
||||
</summary>
|
||||
<param name="cmdType"></param>
|
||||
<param name="cmdText"></param>
|
||||
<param name="cmdParms"></param>
|
||||
<param name="cancellationToken"></param>
|
||||
</member>
|
||||
<member name="M:FreeSql.IAdo.ExecuteArrayAsync(System.String,System.Object,System.Threading.CancellationToken)">
|
||||
<summary>
|
||||
查询,ExecuteArrayAsync("select * from user where age > @age", new { age = 25 })<para></para>
|
||||
提示:parms 参数还可以传 Dictionary<string, object>
|
||||
</summary>
|
||||
<param name="cmdText"></param>
|
||||
<param name="parms"></param>
|
||||
<param name="cancellationToken"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:FreeSql.IAdo.ExecuteDataSetAsync(System.Data.CommandType,System.String,System.Data.Common.DbParameter[],System.Threading.CancellationToken)">
|
||||
<summary>
|
||||
查询
|
||||
</summary>
|
||||
<param name="cmdType"></param>
|
||||
<param name="cmdText"></param>
|
||||
<param name="cmdParms"></param>
|
||||
<param name="cancellationToken"></param>
|
||||
</member>
|
||||
<member name="M:FreeSql.IAdo.ExecuteDataSetAsync(System.String,System.Object,System.Threading.CancellationToken)">
|
||||
<summary>
|
||||
查询,ExecuteDataSetAsync("select * from user where age > @age; select 2", new { age = 25 })<para></para>
|
||||
提示:parms 参数还可以传 Dictionary<string, object>
|
||||
</summary>
|
||||
<param name="cmdText"></param>
|
||||
<param name="parms"></param>
|
||||
<param name="cancellationToken"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:FreeSql.IAdo.ExecuteDataTableAsync(System.Data.CommandType,System.String,System.Data.Common.DbParameter[],System.Threading.CancellationToken)">
|
||||
<summary>
|
||||
查询
|
||||
</summary>
|
||||
<param name="cmdType"></param>
|
||||
<param name="cmdText"></param>
|
||||
<param name="cmdParms"></param>
|
||||
<param name="cancellationToken"></param>
|
||||
</member>
|
||||
<member name="M:FreeSql.IAdo.ExecuteDataTableAsync(System.String,System.Object,System.Threading.CancellationToken)">
|
||||
<summary>
|
||||
查询,ExecuteDataTableAsync("select * from user where age > @age", new { age = 25 })<para></para>
|
||||
提示:parms 参数还可以传 Dictionary<string, object>
|
||||
</summary>
|
||||
<param name="cmdText"></param>
|
||||
<param name="parms"></param>
|
||||
<param name="cancellationToken"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:FreeSql.IAdo.ExecuteNonQueryAsync(System.Data.CommandType,System.String,System.Data.Common.DbParameter[],System.Threading.CancellationToken)">
|
||||
<summary>
|
||||
在【主库】执行
|
||||
</summary>
|
||||
<param name="cmdType"></param>
|
||||
<param name="cmdText"></param>
|
||||
<param name="cmdParms"></param>
|
||||
<param name="cancellationToken"></param>
|
||||
</member>
|
||||
<member name="M:FreeSql.IAdo.ExecuteNonQueryAsync(System.String,System.Object,System.Threading.CancellationToken)">
|
||||
<summary>
|
||||
在【主库】执行,ExecuteNonQueryAsync("delete from user where age > @age", new { age = 25 })<para></para>
|
||||
提示:parms 参数还可以传 Dictionary<string, object>
|
||||
</summary>
|
||||
<param name="cmdText"></param>
|
||||
<param name="parms"></param>
|
||||
<param name="cancellationToken"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:FreeSql.IAdo.ExecuteScalarAsync(System.Data.CommandType,System.String,System.Data.Common.DbParameter[],System.Threading.CancellationToken)">
|
||||
<summary>
|
||||
在【主库】执行
|
||||
</summary>
|
||||
<param name="cmdType"></param>
|
||||
<param name="cmdText"></param>
|
||||
<param name="cmdParms"></param>
|
||||
<param name="cancellationToken"></param>
|
||||
</member>
|
||||
<member name="M:FreeSql.IAdo.ExecuteScalarAsync(System.String,System.Object,System.Threading.CancellationToken)">
|
||||
<summary>
|
||||
在【主库】执行,ExecuteScalarAsync("select 1 from user where age > @age", new { age = 25 })<para></para>
|
||||
提示:parms 参数还可以传 Dictionary<string, object>
|
||||
</summary>
|
||||
<param name="cmdText"></param>
|
||||
<param name="parms"></param>
|
||||
<param name="cancellationToken"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:FreeSql.IAdo.QueryAsync``1(System.Data.CommandType,System.String,System.Data.Common.DbParameter[],System.Threading.CancellationToken)">
|
||||
<summary>
|
||||
执行SQL返回对象集合,QueryAsync<User>("select * from user where age > @age", new SqlParameter { ParameterName = "age", Value = 25 })
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="cmdType"></param>
|
||||
<param name="cmdText"></param>
|
||||
<param name="cmdParms"></param>
|
||||
<param name="cancellationToken"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:FreeSql.IAdo.QueryAsync``1(System.String,System.Object,System.Threading.CancellationToken)">
|
||||
<summary>
|
||||
执行SQL返回对象集合,QueryAsync<User>("select * from user where age > @age", new { age = 25 })<para></para>
|
||||
提示:parms 参数还可以传 Dictionary<string, object>
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="cmdText"></param>
|
||||
<param name="parms"></param>
|
||||
<param name="cancellationToken"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:FreeSql.IAdo.QueryAsync``2(System.Data.CommandType,System.String,System.Data.Common.DbParameter[],System.Threading.CancellationToken)">
|
||||
<summary>
|
||||
执行SQL返回对象集合,Query<User>("select * from user where age > @age; select * from address", new SqlParameter { ParameterName = "age", Value = 25 })
|
||||
</summary>
|
||||
<typeparam name="T1"></typeparam>
|
||||
<typeparam name="T2"></typeparam>
|
||||
<param name="cmdType"></param>
|
||||
<param name="cmdText"></param>
|
||||
<param name="cmdParms"></param>
|
||||
<param name="cancellationToken"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:FreeSql.IAdo.QueryAsync``2(System.String,System.Object,System.Threading.CancellationToken)">
|
||||
<summary>
|
||||
执行SQL返回对象集合,Query<User, Address>("select * from user where age > @age; select * from address", new { age = 25 })<para></para>
|
||||
提示:parms 参数还可以传 Dictionary<string, object>
|
||||
</summary>
|
||||
<typeparam name="T1"></typeparam>
|
||||
<typeparam name="T2"></typeparam>
|
||||
<param name="cmdText"></param>
|
||||
<param name="parms"></param>
|
||||
<param name="cancellationToken"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="E:FreeSql.IAop.ParseExpression">
|
||||
<summary>
|
||||
可自定义解析表达式
|
||||
@@ -4897,12 +4632,6 @@
|
||||
<param name="timeout">超时</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:FreeSql.Internal.ObjectPool.IObjectPool`1.GetAsync">
|
||||
<summary>
|
||||
获取资源
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:FreeSql.Internal.ObjectPool.IObjectPool`1.Return(FreeSql.Internal.ObjectPool.Object{`0},System.Boolean)">
|
||||
<summary>
|
||||
使用完毕后,归还资源
|
||||
@@ -4978,12 +4707,6 @@
|
||||
</summary>
|
||||
<param name="obj">资源对象</param>
|
||||
</member>
|
||||
<member name="M:FreeSql.Internal.ObjectPool.IPolicy`1.OnGetAsync(FreeSql.Internal.ObjectPool.Object{`0})">
|
||||
<summary>
|
||||
从对象池获取对象成功的时候触发,通过该方法统计或初始化对象
|
||||
</summary>
|
||||
<param name="obj">资源对象</param>
|
||||
</member>
|
||||
<member name="M:FreeSql.Internal.ObjectPool.IPolicy`1.OnReturn(FreeSql.Internal.ObjectPool.Object{`0})">
|
||||
<summary>
|
||||
归还对象给对象池的时候触发
|
||||
@@ -5897,28 +5620,6 @@
|
||||
对象池
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:FreeSqlGlobalDynamicEntityExtensions.DynamicEntity(FreeSql.ICodeFirst,System.String,System.Attribute[])">
|
||||
<summary>
|
||||
动态构建Class Type
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:FreeSqlGlobalDynamicEntityExtensions.CreateInstance(FreeSql.Internal.Model.TableInfo,System.Collections.Generic.Dictionary{System.String,System.Object})">
|
||||
<summary>
|
||||
根据字典,创建 table 对应的实体对象
|
||||
</summary>
|
||||
<param name="table"></param>
|
||||
<param name="dict"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:FreeSqlGlobalDynamicEntityExtensions.CreateDictionary(FreeSql.Internal.Model.TableInfo,System.Object)">
|
||||
<summary>
|
||||
根据实体对象,创建 table 对应的字典
|
||||
</summary>
|
||||
<param name="table"></param>
|
||||
<param name="instance"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:FreeSqlGlobalExpressionCallExtensions.Between(System.DateTime,System.DateTime,System.DateTime)">
|
||||
<summary>
|
||||
C#: that >= between && that <= and<para></para>
|
||||
@@ -6485,3 +6186,313 @@
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
ember name="M:System.Linq.Expressions.LambadaExpressionExtensions.Not``1(System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}},System.Boolean)">
|
||||
<summary>
|
||||
将 lambda 表达式取反
|
||||
</summary>
|
||||
<param name="exp"></param>
|
||||
<param name="condition">true 时生效</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.Linq.Expressions.LambadaExpressionExtensions.And``2(System.Linq.Expressions.Expression{System.Func{``0,``1,System.Boolean}},System.Linq.Expressions.Expression{System.Func{``0,``1,System.Boolean}})">
|
||||
<summary>
|
||||
使用 and 拼接两个 lambda 表达式
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.Linq.Expressions.LambadaExpressionExtensions.And``2(System.Linq.Expressions.Expression{System.Func{``0,``1,System.Boolean}},System.Boolean,System.Linq.Expressions.Expression{System.Func{``0,``1,System.Boolean}})">
|
||||
<summary>
|
||||
使用 and 拼接两个 lambda 表达式
|
||||
</summary>
|
||||
<param name="exp1"></param>
|
||||
<param name="condition">true 时生效</param>
|
||||
<param name="exp2"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.Linq.Expressions.LambadaExpressionExtensions.Or``2(System.Linq.Expressions.Expression{System.Func{``0,``1,System.Boolean}},System.Linq.Expressions.Expression{System.Func{``0,``1,System.Boolean}})">
|
||||
<summary>
|
||||
使用 or 拼接两个 lambda 表达式
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.Linq.Expressions.LambadaExpressionExtensions.Or``2(System.Linq.Expressions.Expression{System.Func{``0,``1,System.Boolean}},System.Boolean,System.Linq.Expressions.Expression{System.Func{``0,``1,System.Boolean}})">
|
||||
<summary>
|
||||
使用 or 拼接两个 lambda 表达式
|
||||
</summary>
|
||||
<param name="exp1"></param>
|
||||
<param name="condition">true 时生效</param>
|
||||
<param name="exp2"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.Linq.Expressions.LambadaExpressionExtensions.Not``2(System.Linq.Expressions.Expression{System.Func{``0,``1,System.Boolean}},System.Boolean)">
|
||||
<summary>
|
||||
将 lambda 表达式取反
|
||||
</summary>
|
||||
<param name="exp"></param>
|
||||
<param name="condition">true 时生效</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.Linq.Expressions.LambadaExpressionExtensions.And``3(System.Linq.Expressions.Expression{System.Func{``0,``1,``2,System.Boolean}},System.Linq.Expressions.Expression{System.Func{``0,``1,``2,System.Boolean}})">
|
||||
<summary>
|
||||
使用 and 拼接两个 lambda 表达式
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.Linq.Expressions.LambadaExpressionExtensions.And``3(System.Linq.Expressions.Expression{System.Func{``0,``1,``2,System.Boolean}},System.Boolean,System.Linq.Expressions.Expression{System.Func{``0,``1,``2,System.Boolean}})">
|
||||
<summary>
|
||||
使用 and 拼接两个 lambda 表达式
|
||||
</summary>
|
||||
<param name="exp1"></param>
|
||||
<param name="condition">true 时生效</param>
|
||||
<param name="exp2"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.Linq.Expressions.LambadaExpressionExtensions.Or``3(System.Linq.Expressions.Expression{System.Func{``0,``1,``2,System.Boolean}},System.Linq.Expressions.Expression{System.Func{``0,``1,``2,System.Boolean}})">
|
||||
<summary>
|
||||
使用 or 拼接两个 lambda 表达式
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.Linq.Expressions.LambadaExpressionExtensions.Or``3(System.Linq.Expressions.Expression{System.Func{``0,``1,``2,System.Boolean}},System.Boolean,System.Linq.Expressions.Expression{System.Func{``0,``1,``2,System.Boolean}})">
|
||||
<summary>
|
||||
使用 or 拼接两个 lambda 表达式
|
||||
</summary>
|
||||
<param name="exp1"></param>
|
||||
<param name="condition">true 时生效</param>
|
||||
<param name="exp2"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.Linq.Expressions.LambadaExpressionExtensions.Not``3(System.Linq.Expressions.Expression{System.Func{``0,``1,``2,System.Boolean}},System.Boolean)">
|
||||
<summary>
|
||||
将 lambda 表达式取反
|
||||
</summary>
|
||||
<param name="exp"></param>
|
||||
<param name="condition">true 时生效</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.Linq.Expressions.LambadaExpressionExtensions.And``4(System.Linq.Expressions.Expression{System.Func{``0,``1,``2,``3,System.Boolean}},System.Linq.Expressions.Expression{System.Func{``0,``1,``2,``3,System.Boolean}})">
|
||||
<summary>
|
||||
使用 and 拼接两个 lambda 表达式
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.Linq.Expressions.LambadaExpressionExtensions.And``4(System.Linq.Expressions.Expression{System.Func{``0,``1,``2,``3,System.Boolean}},System.Boolean,System.Linq.Expressions.Expression{System.Func{``0,``1,``2,``3,System.Boolean}})">
|
||||
<summary>
|
||||
使用 and 拼接两个 lambda 表达式
|
||||
</summary>
|
||||
<param name="exp1"></param>
|
||||
<param name="condition">true 时生效</param>
|
||||
<param name="exp2"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.Linq.Expressions.LambadaExpressionExtensions.Or``4(System.Linq.Expressions.Expression{System.Func{``0,``1,``2,``3,System.Boolean}},System.Linq.Expressions.Expression{System.Func{``0,``1,``2,``3,System.Boolean}})">
|
||||
<summary>
|
||||
使用 or 拼接两个 lambda 表达式
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.Linq.Expressions.LambadaExpressionExtensions.Or``4(System.Linq.Expressions.Expression{System.Func{``0,``1,``2,``3,System.Boolean}},System.Boolean,System.Linq.Expressions.Expression{System.Func{``0,``1,``2,``3,System.Boolean}})">
|
||||
<summary>
|
||||
使用 or 拼接两个 lambda 表达式
|
||||
</summary>
|
||||
<param name="exp1"></param>
|
||||
<param name="condition">true 时生效</param>
|
||||
<param name="exp2"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.Linq.Expressions.LambadaExpressionExtensions.Not``4(System.Linq.Expressions.Expression{System.Func{``0,``1,``2,``3,System.Boolean}},System.Boolean)">
|
||||
<summary>
|
||||
将 lambda 表达式取反
|
||||
</summary>
|
||||
<param name="exp"></param>
|
||||
<param name="condition">true 时生效</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.Linq.Expressions.LambadaExpressionExtensions.And``5(System.Linq.Expressions.Expression{System.Func{``0,``1,``2,``3,``4,System.Boolean}},System.Linq.Expressions.Expression{System.Func{``0,``1,``2,``3,``4,System.Boolean}})">
|
||||
<summary>
|
||||
使用 and 拼接两个 lambda 表达式
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.Linq.Expressions.LambadaExpressionExtensions.And``5(System.Linq.Expressions.Expression{System.Func{``0,``1,``2,``3,``4,System.Boolean}},System.Boolean,System.Linq.Expressions.Expression{System.Func{``0,``1,``2,``3,``4,System.Boolean}})">
|
||||
<summary>
|
||||
使用 and 拼接两个 lambda 表达式
|
||||
</summary>
|
||||
<param name="exp1"></param>
|
||||
<param name="condition">true 时生效</param>
|
||||
<param name="exp2"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.Linq.Expressions.LambadaExpressionExtensions.Or``5(System.Linq.Expressions.Expression{System.Func{``0,``1,``2,``3,``4,System.Boolean}},System.Linq.Expressions.Expression{System.Func{``0,``1,``2,``3,``4,System.Boolean}})">
|
||||
<summary>
|
||||
使用 or 拼接两个 lambda 表达式
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.Linq.Expressions.LambadaExpressionExtensions.Or``5(System.Linq.Expressions.Expression{System.Func{``0,``1,``2,``3,``4,System.Boolean}},System.Boolean,System.Linq.Expressions.Expression{System.Func{``0,``1,``2,``3,``4,System.Boolean}})">
|
||||
<summary>
|
||||
使用 or 拼接两个 lambda 表达式
|
||||
</summary>
|
||||
<param name="exp1"></param>
|
||||
<param name="condition">true 时生效</param>
|
||||
<param name="exp2"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.Linq.Expressions.LambadaExpressionExtensions.Not``5(System.Linq.Expressions.Expression{System.Func{``0,``1,``2,``3,``4,System.Boolean}},System.Boolean)">
|
||||
<summary>
|
||||
将 lambda 表达式取反
|
||||
</summary>
|
||||
<param name="exp"></param>
|
||||
<param name="condition">true 时生效</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:FreeUtil.NewMongodbId">
|
||||
<summary>
|
||||
生成类似Mongodb的ObjectId有序、不重复Guid
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IFreeSql.Insert``1">
|
||||
<summary>
|
||||
插入数据
|
||||
</summary>
|
||||
<typeparam name="T1"></typeparam>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IFreeSql.Insert``1(``0)">
|
||||
<summary>
|
||||
插入数据,传入实体
|
||||
</summary>
|
||||
<typeparam name="T1"></typeparam>
|
||||
<param name="source"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IFreeSql.Insert``1(``0[])">
|
||||
<summary>
|
||||
插入数据,传入实体数组
|
||||
</summary>
|
||||
<typeparam name="T1"></typeparam>
|
||||
<param name="source"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IFreeSql.Insert``1(System.Collections.Generic.List{``0})">
|
||||
<summary>
|
||||
插入数据,传入实体集合
|
||||
</summary>
|
||||
<typeparam name="T1"></typeparam>
|
||||
<param name="source"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IFreeSql.Insert``1(System.Collections.Generic.IEnumerable{``0})">
|
||||
<summary>
|
||||
插入数据,传入实体集合
|
||||
</summary>
|
||||
<typeparam name="T1"></typeparam>
|
||||
<param name="source"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IFreeSql.InsertOrUpdate``1">
|
||||
<summary>
|
||||
插入或更新数据,此功能依赖数据库特性(低版本可能不支持),参考如下:<para></para>
|
||||
MySql 5.6+: on duplicate key update<para></para>
|
||||
PostgreSQL 9.4+: on conflict do update<para></para>
|
||||
SqlServer 2008+: merge into<para></para>
|
||||
Oracle 11+: merge into<para></para>
|
||||
Sqlite: replace into<para></para>
|
||||
DuckDB: on conflict do update<para></para>
|
||||
达梦: merge into<para></para>
|
||||
人大金仓:on conflict do update<para></para>
|
||||
神通:merge into<para></para>
|
||||
MsAccess:不支持<para></para>
|
||||
注意区别:FreeSql.Repository 仓储也有 InsertOrUpdate 方法(不依赖数据库特性)
|
||||
</summary>
|
||||
<typeparam name="T1"></typeparam>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IFreeSql.Update``1">
|
||||
<summary>
|
||||
修改数据
|
||||
</summary>
|
||||
<typeparam name="T1"></typeparam>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IFreeSql.Update``1(System.Object)">
|
||||
<summary>
|
||||
修改数据,传入动态条件,如:主键值 | new[]{主键值1,主键值2} | TEntity1 | new[]{TEntity1,TEntity2} | new{id=1}
|
||||
</summary>
|
||||
<typeparam name="T1"></typeparam>
|
||||
<param name="dywhere">主键值、主键值集合、实体、实体集合、匿名对象、匿名对象集合</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IFreeSql.Select``1">
|
||||
<summary>
|
||||
查询数据
|
||||
</summary>
|
||||
<typeparam name="T1"></typeparam>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IFreeSql.Select``1(System.Object)">
|
||||
<summary>
|
||||
查询数据,传入动态条件,如:主键值 | new[]{主键值1,主键值2} | TEntity1 | new[]{TEntity1,TEntity2} | new{id=1}
|
||||
</summary>
|
||||
<typeparam name="T1"></typeparam>
|
||||
<param name="dywhere">主键值、主键值集合、实体、实体集合、匿名对象、匿名对象集合</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IFreeSql.Delete``1">
|
||||
<summary>
|
||||
删除数据
|
||||
</summary>
|
||||
<typeparam name="T1"></typeparam>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IFreeSql.Delete``1(System.Object)">
|
||||
<summary>
|
||||
删除数据,传入动态条件,如:主键值 | new[]{主键值1,主键值2} | TEntity1 | new[]{TEntity1,TEntity2} | new{id=1}
|
||||
</summary>
|
||||
<typeparam name="T1"></typeparam>
|
||||
<param name="dywhere">主键值、主键值集合、实体、实体集合、匿名对象、匿名对象集合</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IFreeSql.Transaction(System.Action)">
|
||||
<summary>
|
||||
开启事务(不支持异步)<para></para>
|
||||
v1.5.0 关闭了线程事务超时自动提交的机制
|
||||
</summary>
|
||||
<param name="handler">事务体 () => {}</param>
|
||||
</member>
|
||||
<member name="M:IFreeSql.Transaction(System.Data.IsolationLevel,System.Action)">
|
||||
<summary>
|
||||
开启事务(不支持异步)<para></para>
|
||||
v1.5.0 关闭了线程事务超时自动提交的机制
|
||||
</summary>
|
||||
<param name="isolationLevel"></param>
|
||||
<param name="handler">事务体 () => {}</param>
|
||||
</member>
|
||||
<member name="P:IFreeSql.Ado">
|
||||
<summary>
|
||||
数据库访问对象
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IFreeSql.Aop">
|
||||
<summary>
|
||||
所有拦截方法都在这里
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IFreeSql.CodeFirst">
|
||||
<summary>
|
||||
CodeFirst 模式开发相关方法
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IFreeSql.DbFirst">
|
||||
<summary>
|
||||
DbFirst 模式开发相关方法
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IFreeSql.GlobalFilter">
|
||||
<summary>
|
||||
全局过滤设置,可默认附加为 Select/Update/Delete 条件
|
||||
</summary>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
|
||||
@@ -27,6 +27,7 @@ namespace FreeSql
|
||||
Task<DataTable> ToDataTableAsync<TReturn>(Expression<Func<T1, T2, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<List<TReturn>> ToListAsync<TReturn>(Expression<Func<T1, T2, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<List<TDto>> ToListAsync<TDto>(CancellationToken cancellationToken = default);
|
||||
Task ToChunkAsync<TReturn>(Expression<Func<T1, T2, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken = default);
|
||||
|
||||
Task<TReturn> ToOneAsync<TReturn>(Expression<Func<T1, T2, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<TReturn> FirstAsync<TReturn>(Expression<Func<T1, T2, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
@@ -44,6 +45,7 @@ namespace FreeSql
|
||||
Task<int> InsertIntoAsync<TTargetEntity>(string tableName, Expression<Func<HzyTuple<T1, T2>, TTargetEntity>> select, CancellationToken cancellationToken = default) where TTargetEntity : class;
|
||||
Task<DataTable> ToDataTableAsync<TReturn>(Expression<Func<HzyTuple<T1, T2>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<List<TReturn>> ToListAsync<TReturn>(Expression<Func<HzyTuple<T1, T2>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task ToChunkAsync<TReturn>(Expression<Func<HzyTuple<T1, T2>, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken = default);
|
||||
|
||||
Task<TReturn> ToOneAsync<TReturn>(Expression<Func<HzyTuple<T1, T2>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<TReturn> FirstAsync<TReturn>(Expression<Func<HzyTuple<T1, T2>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
@@ -77,6 +79,7 @@ namespace FreeSql
|
||||
double Avg<TMember>(Expression<Func<T1, T2, TMember>> column);
|
||||
|
||||
ISelect<T1, T2> LeftJoin(Expression<Func<T1, T2, bool>> exp);
|
||||
ISelect<T1, T2> Join(Expression<Func<T1, T2, bool>> exp);
|
||||
ISelect<T1, T2> InnerJoin(Expression<Func<T1, T2, bool>> exp);
|
||||
ISelect<T1, T2> RightJoin(Expression<Func<T1, T2, bool>> exp);
|
||||
|
||||
@@ -112,6 +115,7 @@ namespace FreeSql
|
||||
double Avg<TMember>(Expression<Func<HzyTuple<T1, T2>, TMember>> column);
|
||||
|
||||
ISelect<T1, T2> LeftJoin(Expression<Func<HzyTuple<T1, T2>, bool>> exp);
|
||||
ISelect<T1, T2> Join(Expression<Func<HzyTuple<T1, T2>, bool>> exp);
|
||||
ISelect<T1, T2> InnerJoin(Expression<Func<HzyTuple<T1, T2>, bool>> exp);
|
||||
ISelect<T1, T2> RightJoin(Expression<Func<HzyTuple<T1, T2>, bool>> exp);
|
||||
|
||||
@@ -144,6 +148,7 @@ namespace FreeSql
|
||||
Task<DataTable> ToDataTableAsync<TReturn>(Expression<Func<T1, T2, T3, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<List<TReturn>> ToListAsync<TReturn>(Expression<Func<T1, T2, T3, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<List<TDto>> ToListAsync<TDto>(CancellationToken cancellationToken = default);
|
||||
Task ToChunkAsync<TReturn>(Expression<Func<T1, T2, T3, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken = default);
|
||||
|
||||
Task<TReturn> ToOneAsync<TReturn>(Expression<Func<T1, T2, T3, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<TReturn> FirstAsync<TReturn>(Expression<Func<T1, T2, T3, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
@@ -161,6 +166,7 @@ namespace FreeSql
|
||||
Task<int> InsertIntoAsync<TTargetEntity>(string tableName, Expression<Func<HzyTuple<T1, T2, T3>, TTargetEntity>> select, CancellationToken cancellationToken = default) where TTargetEntity : class;
|
||||
Task<DataTable> ToDataTableAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<List<TReturn>> ToListAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task ToChunkAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3>, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken = default);
|
||||
|
||||
Task<TReturn> ToOneAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<TReturn> FirstAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
@@ -194,6 +200,7 @@ namespace FreeSql
|
||||
double Avg<TMember>(Expression<Func<T1, T2, T3, TMember>> column);
|
||||
|
||||
ISelect<T1, T2, T3> LeftJoin(Expression<Func<T1, T2, T3, bool>> exp);
|
||||
ISelect<T1, T2, T3> Join(Expression<Func<T1, T2, T3, bool>> exp);
|
||||
ISelect<T1, T2, T3> InnerJoin(Expression<Func<T1, T2, T3, bool>> exp);
|
||||
ISelect<T1, T2, T3> RightJoin(Expression<Func<T1, T2, T3, bool>> exp);
|
||||
|
||||
@@ -229,6 +236,7 @@ namespace FreeSql
|
||||
double Avg<TMember>(Expression<Func<HzyTuple<T1, T2, T3>, TMember>> column);
|
||||
|
||||
ISelect<T1, T2, T3> LeftJoin(Expression<Func<HzyTuple<T1, T2, T3>, bool>> exp);
|
||||
ISelect<T1, T2, T3> Join(Expression<Func<HzyTuple<T1, T2, T3>, bool>> exp);
|
||||
ISelect<T1, T2, T3> InnerJoin(Expression<Func<HzyTuple<T1, T2, T3>, bool>> exp);
|
||||
ISelect<T1, T2, T3> RightJoin(Expression<Func<HzyTuple<T1, T2, T3>, bool>> exp);
|
||||
|
||||
@@ -261,6 +269,7 @@ namespace FreeSql
|
||||
Task<DataTable> ToDataTableAsync<TReturn>(Expression<Func<T1, T2, T3, T4, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<List<TReturn>> ToListAsync<TReturn>(Expression<Func<T1, T2, T3, T4, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<List<TDto>> ToListAsync<TDto>(CancellationToken cancellationToken = default);
|
||||
Task ToChunkAsync<TReturn>(Expression<Func<T1, T2, T3, T4, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken = default);
|
||||
|
||||
Task<TReturn> ToOneAsync<TReturn>(Expression<Func<T1, T2, T3, T4, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<TReturn> FirstAsync<TReturn>(Expression<Func<T1, T2, T3, T4, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
@@ -278,6 +287,7 @@ namespace FreeSql
|
||||
Task<int> InsertIntoAsync<TTargetEntity>(string tableName, Expression<Func<HzyTuple<T1, T2, T3, T4>, TTargetEntity>> select, CancellationToken cancellationToken = default) where TTargetEntity : class;
|
||||
Task<DataTable> ToDataTableAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<List<TReturn>> ToListAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task ToChunkAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4>, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken = default);
|
||||
|
||||
Task<TReturn> ToOneAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<TReturn> FirstAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
@@ -311,6 +321,7 @@ namespace FreeSql
|
||||
double Avg<TMember>(Expression<Func<T1, T2, T3, T4, TMember>> column);
|
||||
|
||||
ISelect<T1, T2, T3, T4> LeftJoin(Expression<Func<T1, T2, T3, T4, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4> Join(Expression<Func<T1, T2, T3, T4, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4> InnerJoin(Expression<Func<T1, T2, T3, T4, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4> RightJoin(Expression<Func<T1, T2, T3, T4, bool>> exp);
|
||||
|
||||
@@ -346,6 +357,7 @@ namespace FreeSql
|
||||
double Avg<TMember>(Expression<Func<HzyTuple<T1, T2, T3, T4>, TMember>> column);
|
||||
|
||||
ISelect<T1, T2, T3, T4> LeftJoin(Expression<Func<HzyTuple<T1, T2, T3, T4>, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4> Join(Expression<Func<HzyTuple<T1, T2, T3, T4>, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4> InnerJoin(Expression<Func<HzyTuple<T1, T2, T3, T4>, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4> RightJoin(Expression<Func<HzyTuple<T1, T2, T3, T4>, bool>> exp);
|
||||
|
||||
@@ -378,6 +390,7 @@ namespace FreeSql
|
||||
Task<DataTable> ToDataTableAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<List<TReturn>> ToListAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<List<TDto>> ToListAsync<TDto>(CancellationToken cancellationToken = default);
|
||||
Task ToChunkAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken = default);
|
||||
|
||||
Task<TReturn> ToOneAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<TReturn> FirstAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
@@ -395,6 +408,7 @@ namespace FreeSql
|
||||
Task<int> InsertIntoAsync<TTargetEntity>(string tableName, Expression<Func<HzyTuple<T1, T2, T3, T4, T5>, TTargetEntity>> select, CancellationToken cancellationToken = default) where TTargetEntity : class;
|
||||
Task<DataTable> ToDataTableAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<List<TReturn>> ToListAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task ToChunkAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5>, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken = default);
|
||||
|
||||
Task<TReturn> ToOneAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<TReturn> FirstAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
@@ -428,6 +442,7 @@ namespace FreeSql
|
||||
double Avg<TMember>(Expression<Func<T1, T2, T3, T4, T5, TMember>> column);
|
||||
|
||||
ISelect<T1, T2, T3, T4, T5> LeftJoin(Expression<Func<T1, T2, T3, T4, T5, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5> Join(Expression<Func<T1, T2, T3, T4, T5, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5> InnerJoin(Expression<Func<T1, T2, T3, T4, T5, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5> RightJoin(Expression<Func<T1, T2, T3, T4, T5, bool>> exp);
|
||||
|
||||
@@ -463,6 +478,7 @@ namespace FreeSql
|
||||
double Avg<TMember>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5>, TMember>> column);
|
||||
|
||||
ISelect<T1, T2, T3, T4, T5> LeftJoin(Expression<Func<HzyTuple<T1, T2, T3, T4, T5>, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5> Join(Expression<Func<HzyTuple<T1, T2, T3, T4, T5>, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5> InnerJoin(Expression<Func<HzyTuple<T1, T2, T3, T4, T5>, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5> RightJoin(Expression<Func<HzyTuple<T1, T2, T3, T4, T5>, bool>> exp);
|
||||
|
||||
@@ -495,6 +511,7 @@ namespace FreeSql
|
||||
Task<DataTable> ToDataTableAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<List<TReturn>> ToListAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<List<TDto>> ToListAsync<TDto>(CancellationToken cancellationToken = default);
|
||||
Task ToChunkAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken = default);
|
||||
|
||||
Task<TReturn> ToOneAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<TReturn> FirstAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
@@ -512,6 +529,7 @@ namespace FreeSql
|
||||
Task<int> InsertIntoAsync<TTargetEntity>(string tableName, Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6>, TTargetEntity>> select, CancellationToken cancellationToken = default) where TTargetEntity : class;
|
||||
Task<DataTable> ToDataTableAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<List<TReturn>> ToListAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task ToChunkAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6>, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken = default);
|
||||
|
||||
Task<TReturn> ToOneAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<TReturn> FirstAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
@@ -545,6 +563,7 @@ namespace FreeSql
|
||||
double Avg<TMember>(Expression<Func<T1, T2, T3, T4, T5, T6, TMember>> column);
|
||||
|
||||
ISelect<T1, T2, T3, T4, T5, T6> LeftJoin(Expression<Func<T1, T2, T3, T4, T5, T6, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6> Join(Expression<Func<T1, T2, T3, T4, T5, T6, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6> InnerJoin(Expression<Func<T1, T2, T3, T4, T5, T6, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6> RightJoin(Expression<Func<T1, T2, T3, T4, T5, T6, bool>> exp);
|
||||
|
||||
@@ -580,6 +599,7 @@ namespace FreeSql
|
||||
double Avg<TMember>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6>, TMember>> column);
|
||||
|
||||
ISelect<T1, T2, T3, T4, T5, T6> LeftJoin(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6>, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6> Join(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6>, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6> InnerJoin(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6>, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6> RightJoin(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6>, bool>> exp);
|
||||
|
||||
@@ -612,6 +632,7 @@ namespace FreeSql
|
||||
Task<DataTable> ToDataTableAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<List<TReturn>> ToListAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<List<TDto>> ToListAsync<TDto>(CancellationToken cancellationToken = default);
|
||||
Task ToChunkAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken = default);
|
||||
|
||||
Task<TReturn> ToOneAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<TReturn> FirstAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
@@ -629,6 +650,7 @@ namespace FreeSql
|
||||
Task<int> InsertIntoAsync<TTargetEntity>(string tableName, Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7>, TTargetEntity>> select, CancellationToken cancellationToken = default) where TTargetEntity : class;
|
||||
Task<DataTable> ToDataTableAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<List<TReturn>> ToListAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task ToChunkAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7>, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken = default);
|
||||
|
||||
Task<TReturn> ToOneAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<TReturn> FirstAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
@@ -662,6 +684,7 @@ namespace FreeSql
|
||||
double Avg<TMember>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, TMember>> column);
|
||||
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7> LeftJoin(Expression<Func<T1, T2, T3, T4, T5, T6, T7, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7> Join(Expression<Func<T1, T2, T3, T4, T5, T6, T7, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7> InnerJoin(Expression<Func<T1, T2, T3, T4, T5, T6, T7, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7> RightJoin(Expression<Func<T1, T2, T3, T4, T5, T6, T7, bool>> exp);
|
||||
|
||||
@@ -697,6 +720,7 @@ namespace FreeSql
|
||||
double Avg<TMember>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7>, TMember>> column);
|
||||
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7> LeftJoin(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7>, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7> Join(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7>, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7> InnerJoin(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7>, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7> RightJoin(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7>, bool>> exp);
|
||||
|
||||
@@ -729,6 +753,7 @@ namespace FreeSql
|
||||
Task<DataTable> ToDataTableAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<List<TReturn>> ToListAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<List<TDto>> ToListAsync<TDto>(CancellationToken cancellationToken = default);
|
||||
Task ToChunkAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken = default);
|
||||
|
||||
Task<TReturn> ToOneAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<TReturn> FirstAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
@@ -746,6 +771,7 @@ namespace FreeSql
|
||||
Task<int> InsertIntoAsync<TTargetEntity>(string tableName, Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8>, TTargetEntity>> select, CancellationToken cancellationToken = default) where TTargetEntity : class;
|
||||
Task<DataTable> ToDataTableAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<List<TReturn>> ToListAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task ToChunkAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8>, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken = default);
|
||||
|
||||
Task<TReturn> ToOneAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<TReturn> FirstAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
@@ -779,6 +805,7 @@ namespace FreeSql
|
||||
double Avg<TMember>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, TMember>> column);
|
||||
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8> LeftJoin(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8> Join(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8> InnerJoin(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8> RightJoin(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, bool>> exp);
|
||||
|
||||
@@ -814,6 +841,7 @@ namespace FreeSql
|
||||
double Avg<TMember>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8>, TMember>> column);
|
||||
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8> LeftJoin(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8>, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8> Join(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8>, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8> InnerJoin(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8>, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8> RightJoin(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8>, bool>> exp);
|
||||
|
||||
@@ -846,6 +874,7 @@ namespace FreeSql
|
||||
Task<DataTable> ToDataTableAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<List<TReturn>> ToListAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<List<TDto>> ToListAsync<TDto>(CancellationToken cancellationToken = default);
|
||||
Task ToChunkAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken = default);
|
||||
|
||||
Task<TReturn> ToOneAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<TReturn> FirstAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
@@ -863,6 +892,7 @@ namespace FreeSql
|
||||
Task<int> InsertIntoAsync<TTargetEntity>(string tableName, Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9>, TTargetEntity>> select, CancellationToken cancellationToken = default) where TTargetEntity : class;
|
||||
Task<DataTable> ToDataTableAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<List<TReturn>> ToListAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task ToChunkAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9>, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken = default);
|
||||
|
||||
Task<TReturn> ToOneAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<TReturn> FirstAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
@@ -896,6 +926,7 @@ namespace FreeSql
|
||||
double Avg<TMember>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, TMember>> column);
|
||||
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9> LeftJoin(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9> Join(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9> InnerJoin(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9> RightJoin(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, bool>> exp);
|
||||
|
||||
@@ -931,6 +962,7 @@ namespace FreeSql
|
||||
double Avg<TMember>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9>, TMember>> column);
|
||||
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9> LeftJoin(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9>, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9> Join(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9>, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9> InnerJoin(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9>, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9> RightJoin(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9>, bool>> exp);
|
||||
|
||||
@@ -963,6 +995,7 @@ namespace FreeSql
|
||||
Task<DataTable> ToDataTableAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<List<TReturn>> ToListAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<List<TDto>> ToListAsync<TDto>(CancellationToken cancellationToken = default);
|
||||
Task ToChunkAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken = default);
|
||||
|
||||
Task<TReturn> ToOneAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<TReturn> FirstAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
@@ -980,6 +1013,7 @@ namespace FreeSql
|
||||
Task<int> InsertIntoAsync<TTargetEntity>(string tableName, Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>, TTargetEntity>> select, CancellationToken cancellationToken = default) where TTargetEntity : class;
|
||||
Task<DataTable> ToDataTableAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<List<TReturn>> ToListAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task ToChunkAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken = default);
|
||||
|
||||
Task<TReturn> ToOneAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<TReturn> FirstAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
@@ -1013,6 +1047,7 @@ namespace FreeSql
|
||||
double Avg<TMember>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, TMember>> column);
|
||||
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> LeftJoin(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> Join(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> InnerJoin(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> RightJoin(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, bool>> exp);
|
||||
|
||||
@@ -1048,6 +1083,7 @@ namespace FreeSql
|
||||
double Avg<TMember>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>, TMember>> column);
|
||||
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> LeftJoin(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> Join(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> InnerJoin(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> RightJoin(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>, bool>> exp);
|
||||
|
||||
@@ -1080,6 +1116,7 @@ namespace FreeSql
|
||||
Task<DataTable> ToDataTableAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<List<TReturn>> ToListAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<List<TDto>> ToListAsync<TDto>(CancellationToken cancellationToken = default);
|
||||
Task ToChunkAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken = default);
|
||||
|
||||
Task<TReturn> ToOneAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<TReturn> FirstAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
@@ -1097,6 +1134,7 @@ namespace FreeSql
|
||||
Task<int> InsertIntoAsync<TTargetEntity>(string tableName, Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>, TTargetEntity>> select, CancellationToken cancellationToken = default) where TTargetEntity : class;
|
||||
Task<DataTable> ToDataTableAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<List<TReturn>> ToListAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task ToChunkAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken = default);
|
||||
|
||||
Task<TReturn> ToOneAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<TReturn> FirstAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
@@ -1130,6 +1168,7 @@ namespace FreeSql
|
||||
double Avg<TMember>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, TMember>> column);
|
||||
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> LeftJoin(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> Join(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> InnerJoin(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> RightJoin(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, bool>> exp);
|
||||
|
||||
@@ -1165,6 +1204,7 @@ namespace FreeSql
|
||||
double Avg<TMember>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>, TMember>> column);
|
||||
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> LeftJoin(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> Join(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> InnerJoin(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> RightJoin(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>, bool>> exp);
|
||||
|
||||
@@ -1197,6 +1237,7 @@ namespace FreeSql
|
||||
Task<DataTable> ToDataTableAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<List<TReturn>> ToListAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<List<TDto>> ToListAsync<TDto>(CancellationToken cancellationToken = default);
|
||||
Task ToChunkAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken = default);
|
||||
|
||||
Task<TReturn> ToOneAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<TReturn> FirstAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
@@ -1214,6 +1255,7 @@ namespace FreeSql
|
||||
Task<int> InsertIntoAsync<TTargetEntity>(string tableName, Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>, TTargetEntity>> select, CancellationToken cancellationToken = default) where TTargetEntity : class;
|
||||
Task<DataTable> ToDataTableAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<List<TReturn>> ToListAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task ToChunkAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken = default);
|
||||
|
||||
Task<TReturn> ToOneAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<TReturn> FirstAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
@@ -1247,6 +1289,7 @@ namespace FreeSql
|
||||
double Avg<TMember>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, TMember>> column);
|
||||
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> LeftJoin(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> Join(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> InnerJoin(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> RightJoin(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, bool>> exp);
|
||||
|
||||
@@ -1282,6 +1325,7 @@ namespace FreeSql
|
||||
double Avg<TMember>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>, TMember>> column);
|
||||
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> LeftJoin(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> Join(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> InnerJoin(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> RightJoin(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>, bool>> exp);
|
||||
|
||||
@@ -1314,6 +1358,7 @@ namespace FreeSql
|
||||
Task<DataTable> ToDataTableAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<List<TReturn>> ToListAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<List<TDto>> ToListAsync<TDto>(CancellationToken cancellationToken = default);
|
||||
Task ToChunkAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken = default);
|
||||
|
||||
Task<TReturn> ToOneAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<TReturn> FirstAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
@@ -1331,6 +1376,7 @@ namespace FreeSql
|
||||
Task<int> InsertIntoAsync<TTargetEntity>(string tableName, Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>, TTargetEntity>> select, CancellationToken cancellationToken = default) where TTargetEntity : class;
|
||||
Task<DataTable> ToDataTableAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<List<TReturn>> ToListAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task ToChunkAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken = default);
|
||||
|
||||
Task<TReturn> ToOneAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<TReturn> FirstAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
@@ -1364,6 +1410,7 @@ namespace FreeSql
|
||||
double Avg<TMember>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, TMember>> column);
|
||||
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> LeftJoin(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> Join(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> InnerJoin(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> RightJoin(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, bool>> exp);
|
||||
|
||||
@@ -1399,6 +1446,7 @@ namespace FreeSql
|
||||
double Avg<TMember>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>, TMember>> column);
|
||||
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> LeftJoin(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> Join(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> InnerJoin(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> RightJoin(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>, bool>> exp);
|
||||
|
||||
@@ -1431,6 +1479,7 @@ namespace FreeSql
|
||||
Task<DataTable> ToDataTableAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<List<TReturn>> ToListAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<List<TDto>> ToListAsync<TDto>(CancellationToken cancellationToken = default);
|
||||
Task ToChunkAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken = default);
|
||||
|
||||
Task<TReturn> ToOneAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<TReturn> FirstAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
@@ -1448,6 +1497,7 @@ namespace FreeSql
|
||||
Task<int> InsertIntoAsync<TTargetEntity>(string tableName, Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>, TTargetEntity>> select, CancellationToken cancellationToken = default) where TTargetEntity : class;
|
||||
Task<DataTable> ToDataTableAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<List<TReturn>> ToListAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task ToChunkAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken = default);
|
||||
|
||||
Task<TReturn> ToOneAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<TReturn> FirstAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
@@ -1481,6 +1531,7 @@ namespace FreeSql
|
||||
double Avg<TMember>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, TMember>> column);
|
||||
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> LeftJoin(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> Join(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> InnerJoin(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> RightJoin(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, bool>> exp);
|
||||
|
||||
@@ -1516,6 +1567,7 @@ namespace FreeSql
|
||||
double Avg<TMember>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>, TMember>> column);
|
||||
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> LeftJoin(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> Join(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> InnerJoin(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> RightJoin(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>, bool>> exp);
|
||||
|
||||
@@ -1548,6 +1600,7 @@ namespace FreeSql
|
||||
Task<DataTable> ToDataTableAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<List<TReturn>> ToListAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<List<TDto>> ToListAsync<TDto>(CancellationToken cancellationToken = default);
|
||||
Task ToChunkAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken = default);
|
||||
|
||||
Task<TReturn> ToOneAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<TReturn> FirstAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
@@ -1565,6 +1618,7 @@ namespace FreeSql
|
||||
Task<int> InsertIntoAsync<TTargetEntity>(string tableName, Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>, TTargetEntity>> select, CancellationToken cancellationToken = default) where TTargetEntity : class;
|
||||
Task<DataTable> ToDataTableAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<List<TReturn>> ToListAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task ToChunkAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken = default);
|
||||
|
||||
Task<TReturn> ToOneAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<TReturn> FirstAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
@@ -1598,6 +1652,7 @@ namespace FreeSql
|
||||
double Avg<TMember>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, TMember>> column);
|
||||
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> LeftJoin(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> Join(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> InnerJoin(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> RightJoin(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, bool>> exp);
|
||||
|
||||
@@ -1633,6 +1688,7 @@ namespace FreeSql
|
||||
double Avg<TMember>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>, TMember>> column);
|
||||
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> LeftJoin(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> Join(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> InnerJoin(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> RightJoin(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>, bool>> exp);
|
||||
|
||||
@@ -1665,6 +1721,7 @@ namespace FreeSql
|
||||
Task<DataTable> ToDataTableAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<List<TReturn>> ToListAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<List<TDto>> ToListAsync<TDto>(CancellationToken cancellationToken = default);
|
||||
Task ToChunkAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken = default);
|
||||
|
||||
Task<TReturn> ToOneAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<TReturn> FirstAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
@@ -1682,6 +1739,7 @@ namespace FreeSql
|
||||
Task<int> InsertIntoAsync<TTargetEntity>(string tableName, Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>, TTargetEntity>> select, CancellationToken cancellationToken = default) where TTargetEntity : class;
|
||||
Task<DataTable> ToDataTableAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<List<TReturn>> ToListAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task ToChunkAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken = default);
|
||||
|
||||
Task<TReturn> ToOneAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<TReturn> FirstAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
@@ -1715,6 +1773,7 @@ namespace FreeSql
|
||||
double Avg<TMember>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, TMember>> column);
|
||||
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> LeftJoin(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> Join(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> InnerJoin(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> RightJoin(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, bool>> exp);
|
||||
|
||||
@@ -1750,6 +1809,7 @@ namespace FreeSql
|
||||
double Avg<TMember>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>, TMember>> column);
|
||||
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> LeftJoin(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> Join(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> InnerJoin(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>, bool>> exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> RightJoin(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>, bool>> exp);
|
||||
|
||||
|
||||
@@ -330,8 +330,22 @@ namespace FreeSql.Internal
|
||||
for (var a = 0; a < initExp.NewExpression.Arguments.Count; a++)
|
||||
{
|
||||
var initExpArg = initExp.NewExpression.Arguments[a];
|
||||
if (initExpArg.Type == typeof(bool) && initExpArg.NodeType == ExpressionType.Call)
|
||||
initExpArg = Expression.Condition(initExpArg, Expression.Constant(true, typeof(bool)), Expression.Constant(false, typeof(bool)));
|
||||
if (initExpArg.Type == typeof(bool))
|
||||
switch (initExpArg.NodeType)
|
||||
{
|
||||
case ExpressionType.Call:
|
||||
case ExpressionType.OrElse:
|
||||
case ExpressionType.AndAlso:
|
||||
case ExpressionType.GreaterThan:
|
||||
case ExpressionType.GreaterThanOrEqual:
|
||||
case ExpressionType.LessThan:
|
||||
case ExpressionType.LessThanOrEqual:
|
||||
case ExpressionType.NotEqual:
|
||||
case ExpressionType.Equal:
|
||||
case ExpressionType.Not:
|
||||
initExpArg = Expression.Condition(initExpArg, Expression.Constant(true, typeof(bool)), Expression.Constant(false, typeof(bool)));
|
||||
break;
|
||||
}
|
||||
var child = new ReadAnonymousTypeInfo
|
||||
{
|
||||
Property = null,
|
||||
@@ -428,8 +442,22 @@ namespace FreeSql.Internal
|
||||
var initAssignExp = (initExp.Bindings[a] as MemberAssignment);
|
||||
if (initAssignExp == null) continue;
|
||||
var initExpArg = initAssignExp.Expression;
|
||||
if (initExpArg.Type == typeof(bool) && initExpArg.NodeType == ExpressionType.Call)
|
||||
initExpArg = Expression.Condition(initExpArg, Expression.Constant(true, typeof(bool)), Expression.Constant(false, typeof(bool)));
|
||||
if (initExpArg.Type == typeof(bool))
|
||||
switch (initExpArg.NodeType)
|
||||
{
|
||||
case ExpressionType.Call:
|
||||
case ExpressionType.OrElse:
|
||||
case ExpressionType.AndAlso:
|
||||
case ExpressionType.GreaterThan:
|
||||
case ExpressionType.GreaterThanOrEqual:
|
||||
case ExpressionType.LessThan:
|
||||
case ExpressionType.LessThanOrEqual:
|
||||
case ExpressionType.NotEqual:
|
||||
case ExpressionType.Equal:
|
||||
case ExpressionType.Not:
|
||||
initExpArg = Expression.Condition(initExpArg, Expression.Constant(true, typeof(bool)), Expression.Constant(false, typeof(bool)));
|
||||
break;
|
||||
}
|
||||
var child = new ReadAnonymousTypeInfo
|
||||
{
|
||||
Property = initExp.Type.GetProperty(initExp.Bindings[a].Member.Name, BindingFlags.Public | BindingFlags.Instance), //#427 不能使用 BindingFlags.IgnoreCase
|
||||
@@ -465,8 +493,22 @@ namespace FreeSql.Internal
|
||||
for (var a = 0; a < newExp.Arguments.Count; a++)
|
||||
{
|
||||
var initExpArg = newExp.Arguments[a];
|
||||
if (initExpArg.Type == typeof(bool) && initExpArg.NodeType == ExpressionType.Call)
|
||||
initExpArg = Expression.Condition(initExpArg, Expression.Constant(true, typeof(bool)), Expression.Constant(false, typeof(bool)));
|
||||
if (initExpArg.Type == typeof(bool))
|
||||
switch (initExpArg.NodeType)
|
||||
{
|
||||
case ExpressionType.Call:
|
||||
case ExpressionType.OrElse:
|
||||
case ExpressionType.AndAlso:
|
||||
case ExpressionType.GreaterThan:
|
||||
case ExpressionType.GreaterThanOrEqual:
|
||||
case ExpressionType.LessThan:
|
||||
case ExpressionType.LessThanOrEqual:
|
||||
case ExpressionType.NotEqual:
|
||||
case ExpressionType.Equal:
|
||||
case ExpressionType.Not:
|
||||
initExpArg = Expression.Condition(initExpArg, Expression.Constant(true, typeof(bool)), Expression.Constant(false, typeof(bool)));
|
||||
break;
|
||||
}
|
||||
var csname = newExp.Members != null ? newExp.Members[a].Name : (initExpArg as MemberExpression)?.Member.Name;
|
||||
var child = new ReadAnonymousTypeInfo
|
||||
{
|
||||
@@ -1206,6 +1248,12 @@ namespace FreeSql.Internal
|
||||
}
|
||||
}
|
||||
}
|
||||
if (exp3.Method.Name == "Select" && exp3.Method.DeclaringType == typeof(Enumerable) && exp3.Arguments[0].CanDynamicInvoke())
|
||||
{
|
||||
//Where(a => dArray.Select(p => p.Key).Contains(a.Id))
|
||||
return formatSql(Expression.Lambda(exp3).Compile().DynamicInvoke(), tsc.mapType, tsc.mapColumnTmp, tsc.dbParams);
|
||||
}
|
||||
|
||||
if (callType.FullName.StartsWith("FreeSql.ISelectGroupingAggregate`"))
|
||||
{
|
||||
switch (exp3.Method.Name)
|
||||
@@ -1776,6 +1824,10 @@ namespace FreeSql.Internal
|
||||
var exp3Args0 = (exp3.Arguments.FirstOrDefault() as UnaryExpression)?.Operand as LambdaExpression;
|
||||
if (exp3Args0.Parameters.Count == 1 && exp3Args0.Parameters[0].Type.FullName.StartsWith("FreeSql.Internal.Model.HzyTuple`"))
|
||||
exp3Args0 = new ReplaceHzyTupleToMultiParam().Modify(exp3Args0, fsqltables);
|
||||
var exp3Args0Tables = fsqltables.Where(a => a.Type != SelectTableInfoType.Parent).ToArray();
|
||||
if (exp3Args0Tables.Length == exp3Args0.Parameters.Count)
|
||||
for (var exp3Args02Index = 0; exp3Args02Index < exp3Args0.Parameters.Count; exp3Args02Index++)
|
||||
exp3Args0Tables[exp3Args02Index].Parameter = exp3Args0.Parameters[exp3Args02Index];
|
||||
var sqlSumField = $"{exp3.Method.Name.ToLower()}({ExpressionLambdaToSql(exp3Args0, tscClone1)})";
|
||||
var sqlSum = tscClone1.subSelect001._limit <= 0 && tscClone1.subSelect001._skip <= 0 ?
|
||||
fsqlType.GetMethod("ToSql", new Type[] { typeof(string) })?.Invoke(fsql, new object[] { $"{exp3.Method.Name.ToLower()}({ExpressionLambdaToSql(exp3Args0, tscClone1)})" })?.ToString() :
|
||||
@@ -1808,6 +1860,10 @@ namespace FreeSql.Internal
|
||||
var exp3Args02 = (exp3.Arguments.FirstOrDefault() as UnaryExpression)?.Operand as LambdaExpression;
|
||||
if (exp3Args02.Parameters.Count == 1 && exp3Args02.Parameters[0].Type.FullName.StartsWith("FreeSql.Internal.Model.HzyTuple`"))
|
||||
exp3Args02 = new ReplaceHzyTupleToMultiParam().Modify(exp3Args02, fsqltables);
|
||||
var exp3Args02Tables = fsqltables.Where(a => a.Type != SelectTableInfoType.Parent).ToArray();
|
||||
if (exp3Args02Tables.Length == exp3Args02.Parameters.Count)
|
||||
for (var exp3Args02Index = 0; exp3Args02Index < exp3Args02.Parameters.Count; exp3Args02Index++)
|
||||
exp3Args02Tables[exp3Args02Index].Parameter = exp3Args02.Parameters[exp3Args02Index];
|
||||
var sqlFirstField = ExpressionLambdaToSql(exp3Args02, tscClone2);
|
||||
var sqlFirst = fsqlType.GetMethod("ToSql", new Type[] { typeof(string) })?.Invoke(fsql, new object[] { sqlFirstField })?.ToString();
|
||||
if (string.IsNullOrEmpty(sqlFirst) == false)
|
||||
@@ -1860,32 +1916,46 @@ namespace FreeSql.Internal
|
||||
case "System.String": extRet = ExpressionLambdaToSqlMemberAccessString(exp4, tsc); break;
|
||||
case "System.DateTime": extRet = ExpressionLambdaToSqlMemberAccessDateTime(exp4, tsc); break;
|
||||
case "System.TimeSpan":
|
||||
if (exp4.Expression != null && (
|
||||
// 如果是以 TimeSpan.Subtract(DateTime) 的方式调用的
|
||||
(exp4.Expression.NodeType == ExpressionType.Call &&
|
||||
exp4.Expression is MethodCallExpression exp4CallExp &&
|
||||
exp4CallExp.Method.Name == "Subtract" &&
|
||||
exp4CallExp.Object != null && exp4CallExp.Object.Type == typeof(DateTime) &&
|
||||
exp4CallExp.Arguments.Count == 1 && exp4CallExp.Arguments[0].Type == typeof(DateTime))
|
||||
// 如果是以 TimeSpan1 -/+ TimeSpan2 的方式调用的
|
||||
|| (exp4.Expression.NodeType == ExpressionType.Subtract || exp4.Expression.NodeType == ExpressionType.Add)
|
||||
)
|
||||
)
|
||||
if (exp4.Expression != null)
|
||||
{
|
||||
var left = ExpressionLambdaToSql(exp4.Expression, tsc);
|
||||
switch (exp4.Member.Name)
|
||||
var exp4MemberIsTrue = false;
|
||||
// 如果是以 DateTime.Subtract(DateTime) 的方式调用的
|
||||
if (exp4.Expression.NodeType == ExpressionType.Call &&
|
||||
exp4.Expression is MethodCallExpression exp4CallExp &&
|
||||
exp4CallExp.Method.Name == "Subtract" &&
|
||||
exp4CallExp.Object != null && exp4CallExp.Object.Type == typeof(DateTime) &&
|
||||
exp4CallExp.Arguments.Count == 1 && exp4CallExp.Arguments[0].Type == typeof(DateTime))
|
||||
{
|
||||
case "Days": return $"floor(({left})/{60 * 60 * 24})";
|
||||
case "Hours": return $"floor(({left})/{60 * 60}%24)";
|
||||
case "Milliseconds": return $"(({left})*1000)";
|
||||
case "Minutes": return $"floor(({left})/60%60)";
|
||||
case "Seconds": return $"(({left})%60)";
|
||||
case "Ticks": return $"(({left})*10000000)";
|
||||
case "TotalDays": return $"(({left})/{60 * 60 * 24}.0)";
|
||||
case "TotalHours": return $"(({left})/{60 * 60}.0)";
|
||||
case "TotalMilliseconds": return $"(({left})*1000)";
|
||||
case "TotalMinutes": return $"(({left})/60.0)";
|
||||
case "TotalSeconds": return $"({left})";
|
||||
extRet = ExpressionLambdaToSqlCallDateDiff(exp4.Member.Name, exp4CallExp.Object, exp4CallExp.Arguments[0], tsc);
|
||||
if (string.IsNullOrEmpty(extRet) == false) return extRet;
|
||||
exp4MemberIsTrue = true;
|
||||
}
|
||||
// 如果是以 DateTime1 - DateTime2 的方式调用的
|
||||
else if (exp4.Expression.NodeType == ExpressionType.Subtract && exp4.Expression.Type == typeof(TimeSpan) &&
|
||||
exp4.Expression is BinaryExpression exp4BinaryExp &&
|
||||
exp4BinaryExp.Left.Type == typeof(DateTime) && exp4BinaryExp.Right.Type == typeof(DateTime))
|
||||
{
|
||||
extRet = ExpressionLambdaToSqlCallDateDiff(exp4.Member.Name, exp4BinaryExp.Left, exp4BinaryExp.Right, tsc);
|
||||
if (string.IsNullOrEmpty(extRet) == false) return extRet;
|
||||
exp4MemberIsTrue = true;
|
||||
}
|
||||
if (exp4MemberIsTrue)
|
||||
{
|
||||
var left = ExpressionLambdaToSql(exp4.Expression, tsc);
|
||||
switch (exp4.Member.Name)
|
||||
{
|
||||
case "Days": return $"floor(({left})/{60 * 60 * 24})";
|
||||
case "Hours": return $"floor(({left})/{60 * 60}%24)";
|
||||
case "Milliseconds": return $"(({left})*1000)";
|
||||
case "Minutes": return $"floor(({left})/60%60)";
|
||||
case "Seconds": return $"(({left})%60)";
|
||||
case "Ticks": return $"(({left})*10000000)";
|
||||
case "TotalDays": return $"(({left})/{60 * 60 * 24}.0)";
|
||||
case "TotalHours": return $"(({left})/{60 * 60}.0)";
|
||||
case "TotalMilliseconds": return $"(({left})*1000)";
|
||||
case "TotalMinutes": return $"(({left})/60.0)";
|
||||
case "TotalSeconds": return $"({left})";
|
||||
}
|
||||
}
|
||||
}
|
||||
throw new Exception(CoreErrorStrings.Unable_Parse_Expression(exp4));
|
||||
@@ -2356,6 +2426,7 @@ namespace FreeSql.Internal
|
||||
public abstract string ExpressionLambdaToSqlMemberAccessDateTime(MemberExpression exp, ExpTSC tsc);
|
||||
public abstract string ExpressionLambdaToSqlCallString(MethodCallExpression exp, ExpTSC tsc);
|
||||
public abstract string ExpressionLambdaToSqlCallMath(MethodCallExpression exp, ExpTSC tsc);
|
||||
public virtual string ExpressionLambdaToSqlCallDateDiff(string memberName, Expression date1, Expression date2, ExpTSC tsc) { return null; }
|
||||
public abstract string ExpressionLambdaToSqlCallDateTime(MethodCallExpression exp, ExpTSC tsc);
|
||||
public abstract string ExpressionLambdaToSqlCallConvert(MethodCallExpression exp, ExpTSC tsc);
|
||||
public abstract string ExpressionLambdaToSqlOther(Expression exp, ExpTSC tsc);
|
||||
|
||||
@@ -1323,7 +1323,6 @@ namespace FreeSql.Internal.CommonProvider
|
||||
ret._transaction = _transaction;
|
||||
ret._whereGlobalFilter = new List<GlobalFilter.Item>(_whereGlobalFilter.ToArray());
|
||||
ret._cancel = _cancel;
|
||||
ret._params.AddRange(_params);
|
||||
if (ret._tables[0].Table == null) ret._tables[0].Table = TableInfo.GetDefaultTable(typeof(TDto));
|
||||
if (selector is LambdaExpression lambdaExp && lambdaExp != null)
|
||||
{
|
||||
@@ -1339,6 +1338,7 @@ namespace FreeSql.Internal.CommonProvider
|
||||
var sql = $"\r\n{this.ToSql(parser._insideSelectList[0].InsideField)}";
|
||||
ret.WithSql(sql);
|
||||
ret._diymemexpWithTempQuery = parser;
|
||||
ret._params.AddRange(_params);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -1247,6 +1247,148 @@ namespace FreeSql.Internal.CommonProvider
|
||||
if (SameSelectPending(ref sql, csspsod)) return Task.FromResult(new List<T1>());
|
||||
return ToListAfPrivateAsync(sql, af, otherData, cancellationToken);
|
||||
}
|
||||
#region ToChunkAsync
|
||||
async internal Task ToListAfChunkPrivateAsync(int chunkSize, Func<FetchCallbackArgs<List<T1>>, Task> chunkDone, string sql, GetAllFieldExpressionTreeInfo af, ReadAnonymousTypeOtherInfo[] otherData, CancellationToken cancellationToken)
|
||||
{
|
||||
if (_cancel?.Invoke() == true) return;
|
||||
var dbParms = _params.ToArray();
|
||||
var before = new Aop.CurdBeforeEventArgs(_tables[0].Table.Type, _tables[0].Table, Aop.CurdType.Select, sql, dbParms);
|
||||
_orm.Aop.CurdBeforeHandler?.Invoke(this, before);
|
||||
var ret = new FetchCallbackArgs<List<T1>> { Object = new List<T1>() };
|
||||
var retCount = 0;
|
||||
Exception exception = null;
|
||||
var checkDoneTimes = 0;
|
||||
try
|
||||
{
|
||||
await _orm.Ado.ExecuteReaderAsync(_connection, _transaction, async fetch =>
|
||||
{
|
||||
if (cancellationToken.IsCancellationRequested)
|
||||
{
|
||||
fetch.IsBreak = true;
|
||||
return;
|
||||
}
|
||||
ret.Object.Add(af.Read(_orm, fetch.Object));
|
||||
if (otherData != null)
|
||||
{
|
||||
var idx = af.FieldCount - 1;
|
||||
foreach (var other in otherData)
|
||||
other.retlist.Add(_commonExpression.ReadAnonymous(other.read, fetch.Object, ref idx, false, null, ret.Object.Count - 1, null, null));
|
||||
}
|
||||
retCount++;
|
||||
if (chunkSize > 0 && chunkSize == ret.Object.Count)
|
||||
{
|
||||
checkDoneTimes++;
|
||||
|
||||
foreach (var include in _includeToListAsync) await include?.Invoke(ret.Object, cancellationToken);
|
||||
_trackToList?.Invoke(ret.Object);
|
||||
await chunkDone(ret);
|
||||
fetch.IsBreak = ret.IsBreak;
|
||||
|
||||
ret.Object.Clear();
|
||||
if (otherData != null)
|
||||
foreach (var other in otherData)
|
||||
other.retlist.Clear();
|
||||
}
|
||||
}, CommandType.Text, sql, _commandTimeout, dbParms, cancellationToken);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
exception = ex;
|
||||
throw;
|
||||
}
|
||||
finally
|
||||
{
|
||||
var after = new Aop.CurdAfterEventArgs(before, exception, retCount);
|
||||
_orm.Aop.CurdAfterHandler?.Invoke(this, after);
|
||||
}
|
||||
if (ret.Object.Any() || checkDoneTimes == 0)
|
||||
{
|
||||
foreach (var include in _includeToListAsync) await include?.Invoke(ret.Object, cancellationToken);
|
||||
_trackToList?.Invoke(ret.Object);
|
||||
await chunkDone(ret);
|
||||
}
|
||||
}
|
||||
internal Task ToListChunkPrivateAsync(int chunkSize, Func<FetchCallbackArgs<List<T1>>, Task> chunkDone, GetAllFieldExpressionTreeInfo af, ReadAnonymousTypeOtherInfo[] otherData, CancellationToken cancellationToken)
|
||||
{
|
||||
string sql = null;
|
||||
if (otherData?.Length > 0)
|
||||
{
|
||||
var sbField = new StringBuilder().Append(af.Field);
|
||||
foreach (var other in otherData)
|
||||
sbField.Append(other.field);
|
||||
sql = this.ToSql(sbField.ToString().TrimStart(','));
|
||||
}
|
||||
else
|
||||
sql = this.ToSql(af.Field);
|
||||
|
||||
return ToListAfChunkPrivateAsync(chunkSize, chunkDone, sql, af, otherData, cancellationToken);
|
||||
}
|
||||
public Task ToChunkAsync(int size, Func<FetchCallbackArgs<List<T1>>, Task> done, bool includeNestedMembers = false, CancellationToken cancellationToken = default)
|
||||
{
|
||||
if (_selectExpression != null) throw new ArgumentException(CoreErrorStrings.Before_Chunk_Cannot_Use_Select);
|
||||
return this.ToListChunkPrivateAsync(size, done, includeNestedMembers == false ? this.GetAllFieldExpressionTreeLevel2() : this.GetAllFieldExpressionTreeLevelAll(), null, cancellationToken);
|
||||
}
|
||||
|
||||
async internal Task ToListMrChunkPrivateAsync<TReturn>(int chunkSize, Func<FetchCallbackArgs<List<TReturn>>, Task> chunkDone, string sql, ReadAnonymousTypeAfInfo af, CancellationToken cancellationToken)
|
||||
{
|
||||
if (_cancel?.Invoke() == true) return;
|
||||
var type = typeof(TReturn);
|
||||
var dbParms = _params.ToArray();
|
||||
var before = new Aop.CurdBeforeEventArgs(_tables[0].Table.Type, _tables[0].Table, Aop.CurdType.Select, sql, dbParms);
|
||||
_orm.Aop.CurdBeforeHandler?.Invoke(this, before);
|
||||
var ret = new FetchCallbackArgs<List<TReturn>> { Object = new List<TReturn>() };
|
||||
var retCount = 0;
|
||||
Exception exception = null;
|
||||
var checkDoneTimes = 0;
|
||||
try
|
||||
{
|
||||
await _orm.Ado.ExecuteReaderAsync(_connection, _transaction, async fetch =>
|
||||
{
|
||||
if (cancellationToken.IsCancellationRequested)
|
||||
{
|
||||
fetch.IsBreak = true;
|
||||
return;
|
||||
}
|
||||
var index = -1;
|
||||
ret.Object.Add((TReturn)_commonExpression.ReadAnonymous(af.map, fetch.Object, ref index, false, null, ret.Object.Count, af.fillIncludeMany, af.fillSubSelectMany));
|
||||
retCount++;
|
||||
if (chunkSize > 0 && chunkSize == ret.Object.Count)
|
||||
{
|
||||
checkDoneTimes++;
|
||||
|
||||
foreach (var include in _includeToListAsync) await include?.Invoke(ret.Object, cancellationToken);
|
||||
_trackToList?.Invoke(ret.Object);
|
||||
await chunkDone(ret);
|
||||
fetch.IsBreak = ret.IsBreak;
|
||||
|
||||
ret.Object.Clear();
|
||||
}
|
||||
}, CommandType.Text, sql, _commandTimeout, dbParms, cancellationToken);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
exception = ex;
|
||||
throw;
|
||||
}
|
||||
finally
|
||||
{
|
||||
var after = new Aop.CurdAfterEventArgs(before, exception, retCount);
|
||||
_orm.Aop.CurdAfterHandler?.Invoke(this, after);
|
||||
}
|
||||
if (ret.Object.Any() || checkDoneTimes == 0)
|
||||
{
|
||||
foreach (var include in _includeToListAsync) await include?.Invoke(ret.Object, cancellationToken);
|
||||
_trackToList?.Invoke(ret.Object);
|
||||
await chunkDone(ret);
|
||||
}
|
||||
}
|
||||
public Task InternalToChunkAsync<TReturn>(Expression select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken)
|
||||
{
|
||||
var af = this.GetExpressionField(select);
|
||||
var sql = this.ToSql(af.field);
|
||||
return this.ToListMrChunkPrivateAsync<TReturn>(size, done, sql, af, cancellationToken);
|
||||
}
|
||||
#endregion
|
||||
|
||||
public Task<Dictionary<TKey, T1>> ToDictionaryAsync<TKey>(Func<T1, TKey> keySelector, CancellationToken cancellationToken) => ToDictionaryAsync(keySelector, a => a, cancellationToken);
|
||||
async public Task<Dictionary<TKey, TElement>> ToDictionaryAsync<TKey, TElement>(Func<T1, TKey> keySelector, Func<T1, TElement> elementSelector, CancellationToken cancellationToken)
|
||||
|
||||
@@ -166,6 +166,7 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return this.InternalJoin(exp?.Body, SelectTableInfoType.LeftJoin);
|
||||
}
|
||||
|
||||
ISelect<T1, T2> ISelect<T1, T2>.Join(Expression<Func<T1, T2, bool>> exp) => (this as ISelect<T1, T2>).InnerJoin(exp);
|
||||
ISelect<T1, T2> ISelect<T1, T2>.InnerJoin(Expression<Func<T1, T2, bool>> exp)
|
||||
{
|
||||
if (exp == null) return this.InternalJoin(exp?.Body, SelectTableInfoType.LeftJoin);
|
||||
@@ -304,6 +305,7 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return (this as ISelect<T1, T2>).LeftJoin((Expression<Func<T1, T2, bool>>)expModify);
|
||||
}
|
||||
|
||||
ISelect<T1, T2> ISelect<T1, T2>.Join(Expression<Func<HzyTuple<T1, T2>, bool>> exp) => (this as ISelect<T1, T2>).InnerJoin(exp);
|
||||
ISelect<T1, T2> ISelect<T1, T2>.InnerJoin(Expression<Func<HzyTuple<T1, T2>, bool>> exp)
|
||||
{
|
||||
var expModify = new CommonExpression.ReplaceHzyTupleToMultiParam().Modify(exp, _tables);
|
||||
@@ -388,6 +390,13 @@ namespace FreeSql.Internal.CommonProvider
|
||||
}
|
||||
Task<List<TDto>> ISelect<T1, T2>.ToListAsync<TDto>(CancellationToken cancellationToken) => (this as ISelect<T1, T2>).ToListAsync(GetToListDtoSelector<TDto>(), cancellationToken);
|
||||
|
||||
async Task ISelect<T1, T2>.ToChunkAsync<TReturn>(Expression<Func<T1, T2, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken)
|
||||
{
|
||||
if (select == null || done == null) return;
|
||||
for (var a = 0; a < select.Parameters.Count; a++) _tables[a].Parameter = select.Parameters[a];
|
||||
await this.InternalToChunkAsync<TReturn>(select.Body, size, done, cancellationToken);
|
||||
}
|
||||
|
||||
Task<DataTable> ISelect<T1, T2>.ToDataTableAsync<TReturn>(Expression<Func<T1, T2, TReturn>> select, CancellationToken cancellationToken)
|
||||
{
|
||||
if (select == null) return this.InternalToDataTableAsync(select?.Body, cancellationToken);
|
||||
@@ -451,6 +460,12 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return (this as ISelect<T1, T2>).ToListAsync((Expression<Func<T1, T2, TReturn>>)expModify, cancellationToken);
|
||||
}
|
||||
|
||||
Task ISelect<T1, T2>.ToChunkAsync<TReturn>(Expression<Func<HzyTuple<T1, T2>, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken)
|
||||
{
|
||||
var expModify = new CommonExpression.ReplaceHzyTupleToMultiParam().Modify(select, _tables);
|
||||
return (this as ISelect<T1, T2>).ToChunkAsync((Expression<Func<T1, T2, TReturn>>)expModify, size, done, cancellationToken);
|
||||
}
|
||||
|
||||
Task<DataTable> ISelect<T1, T2>.ToDataTableAsync<TReturn>(Expression<Func<HzyTuple<T1, T2>, TReturn>> select, CancellationToken cancellationToken)
|
||||
{
|
||||
var expModify = new CommonExpression.ReplaceHzyTupleToMultiParam().Modify(select, _tables);
|
||||
@@ -640,6 +655,7 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return this.InternalJoin(exp?.Body, SelectTableInfoType.LeftJoin);
|
||||
}
|
||||
|
||||
ISelect<T1, T2, T3> ISelect<T1, T2, T3>.Join(Expression<Func<T1, T2, T3, bool>> exp) => (this as ISelect<T1, T2, T3>).InnerJoin(exp);
|
||||
ISelect<T1, T2, T3> ISelect<T1, T2, T3>.InnerJoin(Expression<Func<T1, T2, T3, bool>> exp)
|
||||
{
|
||||
if (exp == null) return this.InternalJoin(exp?.Body, SelectTableInfoType.LeftJoin);
|
||||
@@ -778,6 +794,7 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return (this as ISelect<T1, T2, T3>).LeftJoin((Expression<Func<T1, T2, T3, bool>>)expModify);
|
||||
}
|
||||
|
||||
ISelect<T1, T2, T3> ISelect<T1, T2, T3>.Join(Expression<Func<HzyTuple<T1, T2, T3>, bool>> exp) => (this as ISelect<T1, T2, T3>).InnerJoin(exp);
|
||||
ISelect<T1, T2, T3> ISelect<T1, T2, T3>.InnerJoin(Expression<Func<HzyTuple<T1, T2, T3>, bool>> exp)
|
||||
{
|
||||
var expModify = new CommonExpression.ReplaceHzyTupleToMultiParam().Modify(exp, _tables);
|
||||
@@ -862,6 +879,13 @@ namespace FreeSql.Internal.CommonProvider
|
||||
}
|
||||
Task<List<TDto>> ISelect<T1, T2, T3>.ToListAsync<TDto>(CancellationToken cancellationToken) => (this as ISelect<T1, T2, T3>).ToListAsync(GetToListDtoSelector<TDto>(), cancellationToken);
|
||||
|
||||
async Task ISelect<T1, T2, T3>.ToChunkAsync<TReturn>(Expression<Func<T1, T2, T3, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken)
|
||||
{
|
||||
if (select == null || done == null) return;
|
||||
for (var a = 0; a < select.Parameters.Count; a++) _tables[a].Parameter = select.Parameters[a];
|
||||
await this.InternalToChunkAsync<TReturn>(select.Body, size, done, cancellationToken);
|
||||
}
|
||||
|
||||
Task<DataTable> ISelect<T1, T2, T3>.ToDataTableAsync<TReturn>(Expression<Func<T1, T2, T3, TReturn>> select, CancellationToken cancellationToken)
|
||||
{
|
||||
if (select == null) return this.InternalToDataTableAsync(select?.Body, cancellationToken);
|
||||
@@ -925,6 +949,12 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return (this as ISelect<T1, T2, T3>).ToListAsync((Expression<Func<T1, T2, T3, TReturn>>)expModify, cancellationToken);
|
||||
}
|
||||
|
||||
Task ISelect<T1, T2, T3>.ToChunkAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3>, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken)
|
||||
{
|
||||
var expModify = new CommonExpression.ReplaceHzyTupleToMultiParam().Modify(select, _tables);
|
||||
return (this as ISelect<T1, T2, T3>).ToChunkAsync((Expression<Func<T1, T2, T3, TReturn>>)expModify, size, done, cancellationToken);
|
||||
}
|
||||
|
||||
Task<DataTable> ISelect<T1, T2, T3>.ToDataTableAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3>, TReturn>> select, CancellationToken cancellationToken)
|
||||
{
|
||||
var expModify = new CommonExpression.ReplaceHzyTupleToMultiParam().Modify(select, _tables);
|
||||
@@ -1117,6 +1147,7 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return this.InternalJoin(exp?.Body, SelectTableInfoType.LeftJoin);
|
||||
}
|
||||
|
||||
ISelect<T1, T2, T3, T4> ISelect<T1, T2, T3, T4>.Join(Expression<Func<T1, T2, T3, T4, bool>> exp) => (this as ISelect<T1, T2, T3, T4>).InnerJoin(exp);
|
||||
ISelect<T1, T2, T3, T4> ISelect<T1, T2, T3, T4>.InnerJoin(Expression<Func<T1, T2, T3, T4, bool>> exp)
|
||||
{
|
||||
if (exp == null) return this.InternalJoin(exp?.Body, SelectTableInfoType.LeftJoin);
|
||||
@@ -1255,6 +1286,7 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return (this as ISelect<T1, T2, T3, T4>).LeftJoin((Expression<Func<T1, T2, T3, T4, bool>>)expModify);
|
||||
}
|
||||
|
||||
ISelect<T1, T2, T3, T4> ISelect<T1, T2, T3, T4>.Join(Expression<Func<HzyTuple<T1, T2, T3, T4>, bool>> exp) => (this as ISelect<T1, T2, T3, T4>).InnerJoin(exp);
|
||||
ISelect<T1, T2, T3, T4> ISelect<T1, T2, T3, T4>.InnerJoin(Expression<Func<HzyTuple<T1, T2, T3, T4>, bool>> exp)
|
||||
{
|
||||
var expModify = new CommonExpression.ReplaceHzyTupleToMultiParam().Modify(exp, _tables);
|
||||
@@ -1339,6 +1371,13 @@ namespace FreeSql.Internal.CommonProvider
|
||||
}
|
||||
Task<List<TDto>> ISelect<T1, T2, T3, T4>.ToListAsync<TDto>(CancellationToken cancellationToken) => (this as ISelect<T1, T2, T3, T4>).ToListAsync(GetToListDtoSelector<TDto>(), cancellationToken);
|
||||
|
||||
async Task ISelect<T1, T2, T3, T4>.ToChunkAsync<TReturn>(Expression<Func<T1, T2, T3, T4, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken)
|
||||
{
|
||||
if (select == null || done == null) return;
|
||||
for (var a = 0; a < select.Parameters.Count; a++) _tables[a].Parameter = select.Parameters[a];
|
||||
await this.InternalToChunkAsync<TReturn>(select.Body, size, done, cancellationToken);
|
||||
}
|
||||
|
||||
Task<DataTable> ISelect<T1, T2, T3, T4>.ToDataTableAsync<TReturn>(Expression<Func<T1, T2, T3, T4, TReturn>> select, CancellationToken cancellationToken)
|
||||
{
|
||||
if (select == null) return this.InternalToDataTableAsync(select?.Body, cancellationToken);
|
||||
@@ -1402,6 +1441,12 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return (this as ISelect<T1, T2, T3, T4>).ToListAsync((Expression<Func<T1, T2, T3, T4, TReturn>>)expModify, cancellationToken);
|
||||
}
|
||||
|
||||
Task ISelect<T1, T2, T3, T4>.ToChunkAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4>, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken)
|
||||
{
|
||||
var expModify = new CommonExpression.ReplaceHzyTupleToMultiParam().Modify(select, _tables);
|
||||
return (this as ISelect<T1, T2, T3, T4>).ToChunkAsync((Expression<Func<T1, T2, T3, T4, TReturn>>)expModify, size, done, cancellationToken);
|
||||
}
|
||||
|
||||
Task<DataTable> ISelect<T1, T2, T3, T4>.ToDataTableAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4>, TReturn>> select, CancellationToken cancellationToken)
|
||||
{
|
||||
var expModify = new CommonExpression.ReplaceHzyTupleToMultiParam().Modify(select, _tables);
|
||||
@@ -1597,6 +1642,7 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return this.InternalJoin(exp?.Body, SelectTableInfoType.LeftJoin);
|
||||
}
|
||||
|
||||
ISelect<T1, T2, T3, T4, T5> ISelect<T1, T2, T3, T4, T5>.Join(Expression<Func<T1, T2, T3, T4, T5, bool>> exp) => (this as ISelect<T1, T2, T3, T4, T5>).InnerJoin(exp);
|
||||
ISelect<T1, T2, T3, T4, T5> ISelect<T1, T2, T3, T4, T5>.InnerJoin(Expression<Func<T1, T2, T3, T4, T5, bool>> exp)
|
||||
{
|
||||
if (exp == null) return this.InternalJoin(exp?.Body, SelectTableInfoType.LeftJoin);
|
||||
@@ -1735,6 +1781,7 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return (this as ISelect<T1, T2, T3, T4, T5>).LeftJoin((Expression<Func<T1, T2, T3, T4, T5, bool>>)expModify);
|
||||
}
|
||||
|
||||
ISelect<T1, T2, T3, T4, T5> ISelect<T1, T2, T3, T4, T5>.Join(Expression<Func<HzyTuple<T1, T2, T3, T4, T5>, bool>> exp) => (this as ISelect<T1, T2, T3, T4, T5>).InnerJoin(exp);
|
||||
ISelect<T1, T2, T3, T4, T5> ISelect<T1, T2, T3, T4, T5>.InnerJoin(Expression<Func<HzyTuple<T1, T2, T3, T4, T5>, bool>> exp)
|
||||
{
|
||||
var expModify = new CommonExpression.ReplaceHzyTupleToMultiParam().Modify(exp, _tables);
|
||||
@@ -1819,6 +1866,13 @@ namespace FreeSql.Internal.CommonProvider
|
||||
}
|
||||
Task<List<TDto>> ISelect<T1, T2, T3, T4, T5>.ToListAsync<TDto>(CancellationToken cancellationToken) => (this as ISelect<T1, T2, T3, T4, T5>).ToListAsync(GetToListDtoSelector<TDto>(), cancellationToken);
|
||||
|
||||
async Task ISelect<T1, T2, T3, T4, T5>.ToChunkAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken)
|
||||
{
|
||||
if (select == null || done == null) return;
|
||||
for (var a = 0; a < select.Parameters.Count; a++) _tables[a].Parameter = select.Parameters[a];
|
||||
await this.InternalToChunkAsync<TReturn>(select.Body, size, done, cancellationToken);
|
||||
}
|
||||
|
||||
Task<DataTable> ISelect<T1, T2, T3, T4, T5>.ToDataTableAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, TReturn>> select, CancellationToken cancellationToken)
|
||||
{
|
||||
if (select == null) return this.InternalToDataTableAsync(select?.Body, cancellationToken);
|
||||
@@ -1882,6 +1936,12 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return (this as ISelect<T1, T2, T3, T4, T5>).ToListAsync((Expression<Func<T1, T2, T3, T4, T5, TReturn>>)expModify, cancellationToken);
|
||||
}
|
||||
|
||||
Task ISelect<T1, T2, T3, T4, T5>.ToChunkAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5>, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken)
|
||||
{
|
||||
var expModify = new CommonExpression.ReplaceHzyTupleToMultiParam().Modify(select, _tables);
|
||||
return (this as ISelect<T1, T2, T3, T4, T5>).ToChunkAsync((Expression<Func<T1, T2, T3, T4, T5, TReturn>>)expModify, size, done, cancellationToken);
|
||||
}
|
||||
|
||||
Task<DataTable> ISelect<T1, T2, T3, T4, T5>.ToDataTableAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5>, TReturn>> select, CancellationToken cancellationToken)
|
||||
{
|
||||
var expModify = new CommonExpression.ReplaceHzyTupleToMultiParam().Modify(select, _tables);
|
||||
@@ -2080,6 +2140,7 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return this.InternalJoin(exp?.Body, SelectTableInfoType.LeftJoin);
|
||||
}
|
||||
|
||||
ISelect<T1, T2, T3, T4, T5, T6> ISelect<T1, T2, T3, T4, T5, T6>.Join(Expression<Func<T1, T2, T3, T4, T5, T6, bool>> exp) => (this as ISelect<T1, T2, T3, T4, T5, T6>).InnerJoin(exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6> ISelect<T1, T2, T3, T4, T5, T6>.InnerJoin(Expression<Func<T1, T2, T3, T4, T5, T6, bool>> exp)
|
||||
{
|
||||
if (exp == null) return this.InternalJoin(exp?.Body, SelectTableInfoType.LeftJoin);
|
||||
@@ -2218,6 +2279,7 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return (this as ISelect<T1, T2, T3, T4, T5, T6>).LeftJoin((Expression<Func<T1, T2, T3, T4, T5, T6, bool>>)expModify);
|
||||
}
|
||||
|
||||
ISelect<T1, T2, T3, T4, T5, T6> ISelect<T1, T2, T3, T4, T5, T6>.Join(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6>, bool>> exp) => (this as ISelect<T1, T2, T3, T4, T5, T6>).InnerJoin(exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6> ISelect<T1, T2, T3, T4, T5, T6>.InnerJoin(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6>, bool>> exp)
|
||||
{
|
||||
var expModify = new CommonExpression.ReplaceHzyTupleToMultiParam().Modify(exp, _tables);
|
||||
@@ -2302,6 +2364,13 @@ namespace FreeSql.Internal.CommonProvider
|
||||
}
|
||||
Task<List<TDto>> ISelect<T1, T2, T3, T4, T5, T6>.ToListAsync<TDto>(CancellationToken cancellationToken) => (this as ISelect<T1, T2, T3, T4, T5, T6>).ToListAsync(GetToListDtoSelector<TDto>(), cancellationToken);
|
||||
|
||||
async Task ISelect<T1, T2, T3, T4, T5, T6>.ToChunkAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken)
|
||||
{
|
||||
if (select == null || done == null) return;
|
||||
for (var a = 0; a < select.Parameters.Count; a++) _tables[a].Parameter = select.Parameters[a];
|
||||
await this.InternalToChunkAsync<TReturn>(select.Body, size, done, cancellationToken);
|
||||
}
|
||||
|
||||
Task<DataTable> ISelect<T1, T2, T3, T4, T5, T6>.ToDataTableAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, TReturn>> select, CancellationToken cancellationToken)
|
||||
{
|
||||
if (select == null) return this.InternalToDataTableAsync(select?.Body, cancellationToken);
|
||||
@@ -2365,6 +2434,12 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return (this as ISelect<T1, T2, T3, T4, T5, T6>).ToListAsync((Expression<Func<T1, T2, T3, T4, T5, T6, TReturn>>)expModify, cancellationToken);
|
||||
}
|
||||
|
||||
Task ISelect<T1, T2, T3, T4, T5, T6>.ToChunkAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6>, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken)
|
||||
{
|
||||
var expModify = new CommonExpression.ReplaceHzyTupleToMultiParam().Modify(select, _tables);
|
||||
return (this as ISelect<T1, T2, T3, T4, T5, T6>).ToChunkAsync((Expression<Func<T1, T2, T3, T4, T5, T6, TReturn>>)expModify, size, done, cancellationToken);
|
||||
}
|
||||
|
||||
Task<DataTable> ISelect<T1, T2, T3, T4, T5, T6>.ToDataTableAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6>, TReturn>> select, CancellationToken cancellationToken)
|
||||
{
|
||||
var expModify = new CommonExpression.ReplaceHzyTupleToMultiParam().Modify(select, _tables);
|
||||
@@ -2566,6 +2641,7 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return this.InternalJoin(exp?.Body, SelectTableInfoType.LeftJoin);
|
||||
}
|
||||
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7> ISelect<T1, T2, T3, T4, T5, T6, T7>.Join(Expression<Func<T1, T2, T3, T4, T5, T6, T7, bool>> exp) => (this as ISelect<T1, T2, T3, T4, T5, T6, T7>).InnerJoin(exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7> ISelect<T1, T2, T3, T4, T5, T6, T7>.InnerJoin(Expression<Func<T1, T2, T3, T4, T5, T6, T7, bool>> exp)
|
||||
{
|
||||
if (exp == null) return this.InternalJoin(exp?.Body, SelectTableInfoType.LeftJoin);
|
||||
@@ -2704,6 +2780,7 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return (this as ISelect<T1, T2, T3, T4, T5, T6, T7>).LeftJoin((Expression<Func<T1, T2, T3, T4, T5, T6, T7, bool>>)expModify);
|
||||
}
|
||||
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7> ISelect<T1, T2, T3, T4, T5, T6, T7>.Join(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7>, bool>> exp) => (this as ISelect<T1, T2, T3, T4, T5, T6, T7>).InnerJoin(exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7> ISelect<T1, T2, T3, T4, T5, T6, T7>.InnerJoin(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7>, bool>> exp)
|
||||
{
|
||||
var expModify = new CommonExpression.ReplaceHzyTupleToMultiParam().Modify(exp, _tables);
|
||||
@@ -2788,6 +2865,13 @@ namespace FreeSql.Internal.CommonProvider
|
||||
}
|
||||
Task<List<TDto>> ISelect<T1, T2, T3, T4, T5, T6, T7>.ToListAsync<TDto>(CancellationToken cancellationToken) => (this as ISelect<T1, T2, T3, T4, T5, T6, T7>).ToListAsync(GetToListDtoSelector<TDto>(), cancellationToken);
|
||||
|
||||
async Task ISelect<T1, T2, T3, T4, T5, T6, T7>.ToChunkAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken)
|
||||
{
|
||||
if (select == null || done == null) return;
|
||||
for (var a = 0; a < select.Parameters.Count; a++) _tables[a].Parameter = select.Parameters[a];
|
||||
await this.InternalToChunkAsync<TReturn>(select.Body, size, done, cancellationToken);
|
||||
}
|
||||
|
||||
Task<DataTable> ISelect<T1, T2, T3, T4, T5, T6, T7>.ToDataTableAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, TReturn>> select, CancellationToken cancellationToken)
|
||||
{
|
||||
if (select == null) return this.InternalToDataTableAsync(select?.Body, cancellationToken);
|
||||
@@ -2851,6 +2935,12 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return (this as ISelect<T1, T2, T3, T4, T5, T6, T7>).ToListAsync((Expression<Func<T1, T2, T3, T4, T5, T6, T7, TReturn>>)expModify, cancellationToken);
|
||||
}
|
||||
|
||||
Task ISelect<T1, T2, T3, T4, T5, T6, T7>.ToChunkAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7>, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken)
|
||||
{
|
||||
var expModify = new CommonExpression.ReplaceHzyTupleToMultiParam().Modify(select, _tables);
|
||||
return (this as ISelect<T1, T2, T3, T4, T5, T6, T7>).ToChunkAsync((Expression<Func<T1, T2, T3, T4, T5, T6, T7, TReturn>>)expModify, size, done, cancellationToken);
|
||||
}
|
||||
|
||||
Task<DataTable> ISelect<T1, T2, T3, T4, T5, T6, T7>.ToDataTableAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7>, TReturn>> select, CancellationToken cancellationToken)
|
||||
{
|
||||
var expModify = new CommonExpression.ReplaceHzyTupleToMultiParam().Modify(select, _tables);
|
||||
@@ -3055,6 +3145,7 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return this.InternalJoin(exp?.Body, SelectTableInfoType.LeftJoin);
|
||||
}
|
||||
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8> ISelect<T1, T2, T3, T4, T5, T6, T7, T8>.Join(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, bool>> exp) => (this as ISelect<T1, T2, T3, T4, T5, T6, T7, T8>).InnerJoin(exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8> ISelect<T1, T2, T3, T4, T5, T6, T7, T8>.InnerJoin(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, bool>> exp)
|
||||
{
|
||||
if (exp == null) return this.InternalJoin(exp?.Body, SelectTableInfoType.LeftJoin);
|
||||
@@ -3193,6 +3284,7 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return (this as ISelect<T1, T2, T3, T4, T5, T6, T7, T8>).LeftJoin((Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, bool>>)expModify);
|
||||
}
|
||||
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8> ISelect<T1, T2, T3, T4, T5, T6, T7, T8>.Join(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8>, bool>> exp) => (this as ISelect<T1, T2, T3, T4, T5, T6, T7, T8>).InnerJoin(exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8> ISelect<T1, T2, T3, T4, T5, T6, T7, T8>.InnerJoin(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8>, bool>> exp)
|
||||
{
|
||||
var expModify = new CommonExpression.ReplaceHzyTupleToMultiParam().Modify(exp, _tables);
|
||||
@@ -3277,6 +3369,13 @@ namespace FreeSql.Internal.CommonProvider
|
||||
}
|
||||
Task<List<TDto>> ISelect<T1, T2, T3, T4, T5, T6, T7, T8>.ToListAsync<TDto>(CancellationToken cancellationToken) => (this as ISelect<T1, T2, T3, T4, T5, T6, T7, T8>).ToListAsync(GetToListDtoSelector<TDto>(), cancellationToken);
|
||||
|
||||
async Task ISelect<T1, T2, T3, T4, T5, T6, T7, T8>.ToChunkAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken)
|
||||
{
|
||||
if (select == null || done == null) return;
|
||||
for (var a = 0; a < select.Parameters.Count; a++) _tables[a].Parameter = select.Parameters[a];
|
||||
await this.InternalToChunkAsync<TReturn>(select.Body, size, done, cancellationToken);
|
||||
}
|
||||
|
||||
Task<DataTable> ISelect<T1, T2, T3, T4, T5, T6, T7, T8>.ToDataTableAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, TReturn>> select, CancellationToken cancellationToken)
|
||||
{
|
||||
if (select == null) return this.InternalToDataTableAsync(select?.Body, cancellationToken);
|
||||
@@ -3340,6 +3439,12 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return (this as ISelect<T1, T2, T3, T4, T5, T6, T7, T8>).ToListAsync((Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, TReturn>>)expModify, cancellationToken);
|
||||
}
|
||||
|
||||
Task ISelect<T1, T2, T3, T4, T5, T6, T7, T8>.ToChunkAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8>, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken)
|
||||
{
|
||||
var expModify = new CommonExpression.ReplaceHzyTupleToMultiParam().Modify(select, _tables);
|
||||
return (this as ISelect<T1, T2, T3, T4, T5, T6, T7, T8>).ToChunkAsync((Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, TReturn>>)expModify, size, done, cancellationToken);
|
||||
}
|
||||
|
||||
Task<DataTable> ISelect<T1, T2, T3, T4, T5, T6, T7, T8>.ToDataTableAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8>, TReturn>> select, CancellationToken cancellationToken)
|
||||
{
|
||||
var expModify = new CommonExpression.ReplaceHzyTupleToMultiParam().Modify(select, _tables);
|
||||
@@ -3547,6 +3652,7 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return this.InternalJoin(exp?.Body, SelectTableInfoType.LeftJoin);
|
||||
}
|
||||
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9>.Join(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, bool>> exp) => (this as ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9>).InnerJoin(exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9>.InnerJoin(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, bool>> exp)
|
||||
{
|
||||
if (exp == null) return this.InternalJoin(exp?.Body, SelectTableInfoType.LeftJoin);
|
||||
@@ -3685,6 +3791,7 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return (this as ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9>).LeftJoin((Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, bool>>)expModify);
|
||||
}
|
||||
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9>.Join(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9>, bool>> exp) => (this as ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9>).InnerJoin(exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9>.InnerJoin(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9>, bool>> exp)
|
||||
{
|
||||
var expModify = new CommonExpression.ReplaceHzyTupleToMultiParam().Modify(exp, _tables);
|
||||
@@ -3769,6 +3876,13 @@ namespace FreeSql.Internal.CommonProvider
|
||||
}
|
||||
Task<List<TDto>> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9>.ToListAsync<TDto>(CancellationToken cancellationToken) => (this as ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9>).ToListAsync(GetToListDtoSelector<TDto>(), cancellationToken);
|
||||
|
||||
async Task ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9>.ToChunkAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken)
|
||||
{
|
||||
if (select == null || done == null) return;
|
||||
for (var a = 0; a < select.Parameters.Count; a++) _tables[a].Parameter = select.Parameters[a];
|
||||
await this.InternalToChunkAsync<TReturn>(select.Body, size, done, cancellationToken);
|
||||
}
|
||||
|
||||
Task<DataTable> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9>.ToDataTableAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, TReturn>> select, CancellationToken cancellationToken)
|
||||
{
|
||||
if (select == null) return this.InternalToDataTableAsync(select?.Body, cancellationToken);
|
||||
@@ -3832,6 +3946,12 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return (this as ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9>).ToListAsync((Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, TReturn>>)expModify, cancellationToken);
|
||||
}
|
||||
|
||||
Task ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9>.ToChunkAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9>, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken)
|
||||
{
|
||||
var expModify = new CommonExpression.ReplaceHzyTupleToMultiParam().Modify(select, _tables);
|
||||
return (this as ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9>).ToChunkAsync((Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, TReturn>>)expModify, size, done, cancellationToken);
|
||||
}
|
||||
|
||||
Task<DataTable> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9>.ToDataTableAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9>, TReturn>> select, CancellationToken cancellationToken)
|
||||
{
|
||||
var expModify = new CommonExpression.ReplaceHzyTupleToMultiParam().Modify(select, _tables);
|
||||
@@ -4042,6 +4162,7 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return this.InternalJoin(exp?.Body, SelectTableInfoType.LeftJoin);
|
||||
}
|
||||
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>.Join(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, bool>> exp) => (this as ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>).InnerJoin(exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>.InnerJoin(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, bool>> exp)
|
||||
{
|
||||
if (exp == null) return this.InternalJoin(exp?.Body, SelectTableInfoType.LeftJoin);
|
||||
@@ -4180,6 +4301,7 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return (this as ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>).LeftJoin((Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, bool>>)expModify);
|
||||
}
|
||||
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>.Join(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>, bool>> exp) => (this as ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>).InnerJoin(exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>.InnerJoin(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>, bool>> exp)
|
||||
{
|
||||
var expModify = new CommonExpression.ReplaceHzyTupleToMultiParam().Modify(exp, _tables);
|
||||
@@ -4264,6 +4386,13 @@ namespace FreeSql.Internal.CommonProvider
|
||||
}
|
||||
Task<List<TDto>> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>.ToListAsync<TDto>(CancellationToken cancellationToken) => (this as ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>).ToListAsync(GetToListDtoSelector<TDto>(), cancellationToken);
|
||||
|
||||
async Task ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>.ToChunkAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken)
|
||||
{
|
||||
if (select == null || done == null) return;
|
||||
for (var a = 0; a < select.Parameters.Count; a++) _tables[a].Parameter = select.Parameters[a];
|
||||
await this.InternalToChunkAsync<TReturn>(select.Body, size, done, cancellationToken);
|
||||
}
|
||||
|
||||
Task<DataTable> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>.ToDataTableAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, TReturn>> select, CancellationToken cancellationToken)
|
||||
{
|
||||
if (select == null) return this.InternalToDataTableAsync(select?.Body, cancellationToken);
|
||||
@@ -4327,6 +4456,12 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return (this as ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>).ToListAsync((Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, TReturn>>)expModify, cancellationToken);
|
||||
}
|
||||
|
||||
Task ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>.ToChunkAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken)
|
||||
{
|
||||
var expModify = new CommonExpression.ReplaceHzyTupleToMultiParam().Modify(select, _tables);
|
||||
return (this as ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>).ToChunkAsync((Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, TReturn>>)expModify, size, done, cancellationToken);
|
||||
}
|
||||
|
||||
Task<DataTable> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>.ToDataTableAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>, TReturn>> select, CancellationToken cancellationToken)
|
||||
{
|
||||
var expModify = new CommonExpression.ReplaceHzyTupleToMultiParam().Modify(select, _tables);
|
||||
@@ -4540,6 +4675,7 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return this.InternalJoin(exp?.Body, SelectTableInfoType.LeftJoin);
|
||||
}
|
||||
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>.Join(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, bool>> exp) => (this as ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>).InnerJoin(exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>.InnerJoin(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, bool>> exp)
|
||||
{
|
||||
if (exp == null) return this.InternalJoin(exp?.Body, SelectTableInfoType.LeftJoin);
|
||||
@@ -4678,6 +4814,7 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return (this as ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>).LeftJoin((Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, bool>>)expModify);
|
||||
}
|
||||
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>.Join(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>, bool>> exp) => (this as ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>).InnerJoin(exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>.InnerJoin(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>, bool>> exp)
|
||||
{
|
||||
var expModify = new CommonExpression.ReplaceHzyTupleToMultiParam().Modify(exp, _tables);
|
||||
@@ -4762,6 +4899,13 @@ namespace FreeSql.Internal.CommonProvider
|
||||
}
|
||||
Task<List<TDto>> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>.ToListAsync<TDto>(CancellationToken cancellationToken) => (this as ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>).ToListAsync(GetToListDtoSelector<TDto>(), cancellationToken);
|
||||
|
||||
async Task ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>.ToChunkAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken)
|
||||
{
|
||||
if (select == null || done == null) return;
|
||||
for (var a = 0; a < select.Parameters.Count; a++) _tables[a].Parameter = select.Parameters[a];
|
||||
await this.InternalToChunkAsync<TReturn>(select.Body, size, done, cancellationToken);
|
||||
}
|
||||
|
||||
Task<DataTable> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>.ToDataTableAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, TReturn>> select, CancellationToken cancellationToken)
|
||||
{
|
||||
if (select == null) return this.InternalToDataTableAsync(select?.Body, cancellationToken);
|
||||
@@ -4825,6 +4969,12 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return (this as ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>).ToListAsync((Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, TReturn>>)expModify, cancellationToken);
|
||||
}
|
||||
|
||||
Task ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>.ToChunkAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken)
|
||||
{
|
||||
var expModify = new CommonExpression.ReplaceHzyTupleToMultiParam().Modify(select, _tables);
|
||||
return (this as ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>).ToChunkAsync((Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, TReturn>>)expModify, size, done, cancellationToken);
|
||||
}
|
||||
|
||||
Task<DataTable> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>.ToDataTableAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>, TReturn>> select, CancellationToken cancellationToken)
|
||||
{
|
||||
var expModify = new CommonExpression.ReplaceHzyTupleToMultiParam().Modify(select, _tables);
|
||||
@@ -5041,6 +5191,7 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return this.InternalJoin(exp?.Body, SelectTableInfoType.LeftJoin);
|
||||
}
|
||||
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>.Join(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, bool>> exp) => (this as ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>).InnerJoin(exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>.InnerJoin(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, bool>> exp)
|
||||
{
|
||||
if (exp == null) return this.InternalJoin(exp?.Body, SelectTableInfoType.LeftJoin);
|
||||
@@ -5179,6 +5330,7 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return (this as ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>).LeftJoin((Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, bool>>)expModify);
|
||||
}
|
||||
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>.Join(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>, bool>> exp) => (this as ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>).InnerJoin(exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>.InnerJoin(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>, bool>> exp)
|
||||
{
|
||||
var expModify = new CommonExpression.ReplaceHzyTupleToMultiParam().Modify(exp, _tables);
|
||||
@@ -5263,6 +5415,13 @@ namespace FreeSql.Internal.CommonProvider
|
||||
}
|
||||
Task<List<TDto>> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>.ToListAsync<TDto>(CancellationToken cancellationToken) => (this as ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>).ToListAsync(GetToListDtoSelector<TDto>(), cancellationToken);
|
||||
|
||||
async Task ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>.ToChunkAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken)
|
||||
{
|
||||
if (select == null || done == null) return;
|
||||
for (var a = 0; a < select.Parameters.Count; a++) _tables[a].Parameter = select.Parameters[a];
|
||||
await this.InternalToChunkAsync<TReturn>(select.Body, size, done, cancellationToken);
|
||||
}
|
||||
|
||||
Task<DataTable> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>.ToDataTableAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, TReturn>> select, CancellationToken cancellationToken)
|
||||
{
|
||||
if (select == null) return this.InternalToDataTableAsync(select?.Body, cancellationToken);
|
||||
@@ -5326,6 +5485,12 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return (this as ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>).ToListAsync((Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, TReturn>>)expModify, cancellationToken);
|
||||
}
|
||||
|
||||
Task ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>.ToChunkAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken)
|
||||
{
|
||||
var expModify = new CommonExpression.ReplaceHzyTupleToMultiParam().Modify(select, _tables);
|
||||
return (this as ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>).ToChunkAsync((Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, TReturn>>)expModify, size, done, cancellationToken);
|
||||
}
|
||||
|
||||
Task<DataTable> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>.ToDataTableAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>, TReturn>> select, CancellationToken cancellationToken)
|
||||
{
|
||||
var expModify = new CommonExpression.ReplaceHzyTupleToMultiParam().Modify(select, _tables);
|
||||
@@ -5545,6 +5710,7 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return this.InternalJoin(exp?.Body, SelectTableInfoType.LeftJoin);
|
||||
}
|
||||
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>.Join(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, bool>> exp) => (this as ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>).InnerJoin(exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>.InnerJoin(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, bool>> exp)
|
||||
{
|
||||
if (exp == null) return this.InternalJoin(exp?.Body, SelectTableInfoType.LeftJoin);
|
||||
@@ -5683,6 +5849,7 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return (this as ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>).LeftJoin((Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, bool>>)expModify);
|
||||
}
|
||||
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>.Join(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>, bool>> exp) => (this as ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>).InnerJoin(exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>.InnerJoin(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>, bool>> exp)
|
||||
{
|
||||
var expModify = new CommonExpression.ReplaceHzyTupleToMultiParam().Modify(exp, _tables);
|
||||
@@ -5767,6 +5934,13 @@ namespace FreeSql.Internal.CommonProvider
|
||||
}
|
||||
Task<List<TDto>> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>.ToListAsync<TDto>(CancellationToken cancellationToken) => (this as ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>).ToListAsync(GetToListDtoSelector<TDto>(), cancellationToken);
|
||||
|
||||
async Task ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>.ToChunkAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken)
|
||||
{
|
||||
if (select == null || done == null) return;
|
||||
for (var a = 0; a < select.Parameters.Count; a++) _tables[a].Parameter = select.Parameters[a];
|
||||
await this.InternalToChunkAsync<TReturn>(select.Body, size, done, cancellationToken);
|
||||
}
|
||||
|
||||
Task<DataTable> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>.ToDataTableAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, TReturn>> select, CancellationToken cancellationToken)
|
||||
{
|
||||
if (select == null) return this.InternalToDataTableAsync(select?.Body, cancellationToken);
|
||||
@@ -5830,6 +6004,12 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return (this as ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>).ToListAsync((Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, TReturn>>)expModify, cancellationToken);
|
||||
}
|
||||
|
||||
Task ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>.ToChunkAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken)
|
||||
{
|
||||
var expModify = new CommonExpression.ReplaceHzyTupleToMultiParam().Modify(select, _tables);
|
||||
return (this as ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>).ToChunkAsync((Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, TReturn>>)expModify, size, done, cancellationToken);
|
||||
}
|
||||
|
||||
Task<DataTable> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>.ToDataTableAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>, TReturn>> select, CancellationToken cancellationToken)
|
||||
{
|
||||
var expModify = new CommonExpression.ReplaceHzyTupleToMultiParam().Modify(select, _tables);
|
||||
@@ -6052,6 +6232,7 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return this.InternalJoin(exp?.Body, SelectTableInfoType.LeftJoin);
|
||||
}
|
||||
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>.Join(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, bool>> exp) => (this as ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>).InnerJoin(exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>.InnerJoin(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, bool>> exp)
|
||||
{
|
||||
if (exp == null) return this.InternalJoin(exp?.Body, SelectTableInfoType.LeftJoin);
|
||||
@@ -6190,6 +6371,7 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return (this as ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>).LeftJoin((Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, bool>>)expModify);
|
||||
}
|
||||
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>.Join(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>, bool>> exp) => (this as ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>).InnerJoin(exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>.InnerJoin(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>, bool>> exp)
|
||||
{
|
||||
var expModify = new CommonExpression.ReplaceHzyTupleToMultiParam().Modify(exp, _tables);
|
||||
@@ -6274,6 +6456,13 @@ namespace FreeSql.Internal.CommonProvider
|
||||
}
|
||||
Task<List<TDto>> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>.ToListAsync<TDto>(CancellationToken cancellationToken) => (this as ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>).ToListAsync(GetToListDtoSelector<TDto>(), cancellationToken);
|
||||
|
||||
async Task ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>.ToChunkAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken)
|
||||
{
|
||||
if (select == null || done == null) return;
|
||||
for (var a = 0; a < select.Parameters.Count; a++) _tables[a].Parameter = select.Parameters[a];
|
||||
await this.InternalToChunkAsync<TReturn>(select.Body, size, done, cancellationToken);
|
||||
}
|
||||
|
||||
Task<DataTable> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>.ToDataTableAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, TReturn>> select, CancellationToken cancellationToken)
|
||||
{
|
||||
if (select == null) return this.InternalToDataTableAsync(select?.Body, cancellationToken);
|
||||
@@ -6337,6 +6526,12 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return (this as ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>).ToListAsync((Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, TReturn>>)expModify, cancellationToken);
|
||||
}
|
||||
|
||||
Task ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>.ToChunkAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken)
|
||||
{
|
||||
var expModify = new CommonExpression.ReplaceHzyTupleToMultiParam().Modify(select, _tables);
|
||||
return (this as ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>).ToChunkAsync((Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, TReturn>>)expModify, size, done, cancellationToken);
|
||||
}
|
||||
|
||||
Task<DataTable> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>.ToDataTableAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>, TReturn>> select, CancellationToken cancellationToken)
|
||||
{
|
||||
var expModify = new CommonExpression.ReplaceHzyTupleToMultiParam().Modify(select, _tables);
|
||||
@@ -6562,6 +6757,7 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return this.InternalJoin(exp?.Body, SelectTableInfoType.LeftJoin);
|
||||
}
|
||||
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>.Join(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, bool>> exp) => (this as ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>).InnerJoin(exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>.InnerJoin(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, bool>> exp)
|
||||
{
|
||||
if (exp == null) return this.InternalJoin(exp?.Body, SelectTableInfoType.LeftJoin);
|
||||
@@ -6700,6 +6896,7 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return (this as ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>).LeftJoin((Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, bool>>)expModify);
|
||||
}
|
||||
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>.Join(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>, bool>> exp) => (this as ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>).InnerJoin(exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>.InnerJoin(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>, bool>> exp)
|
||||
{
|
||||
var expModify = new CommonExpression.ReplaceHzyTupleToMultiParam().Modify(exp, _tables);
|
||||
@@ -6784,6 +6981,13 @@ namespace FreeSql.Internal.CommonProvider
|
||||
}
|
||||
Task<List<TDto>> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>.ToListAsync<TDto>(CancellationToken cancellationToken) => (this as ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>).ToListAsync(GetToListDtoSelector<TDto>(), cancellationToken);
|
||||
|
||||
async Task ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>.ToChunkAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken)
|
||||
{
|
||||
if (select == null || done == null) return;
|
||||
for (var a = 0; a < select.Parameters.Count; a++) _tables[a].Parameter = select.Parameters[a];
|
||||
await this.InternalToChunkAsync<TReturn>(select.Body, size, done, cancellationToken);
|
||||
}
|
||||
|
||||
Task<DataTable> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>.ToDataTableAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, TReturn>> select, CancellationToken cancellationToken)
|
||||
{
|
||||
if (select == null) return this.InternalToDataTableAsync(select?.Body, cancellationToken);
|
||||
@@ -6847,6 +7051,12 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return (this as ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>).ToListAsync((Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, TReturn>>)expModify, cancellationToken);
|
||||
}
|
||||
|
||||
Task ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>.ToChunkAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken)
|
||||
{
|
||||
var expModify = new CommonExpression.ReplaceHzyTupleToMultiParam().Modify(select, _tables);
|
||||
return (this as ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>).ToChunkAsync((Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, TReturn>>)expModify, size, done, cancellationToken);
|
||||
}
|
||||
|
||||
Task<DataTable> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>.ToDataTableAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>, TReturn>> select, CancellationToken cancellationToken)
|
||||
{
|
||||
var expModify = new CommonExpression.ReplaceHzyTupleToMultiParam().Modify(select, _tables);
|
||||
@@ -7075,6 +7285,7 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return this.InternalJoin(exp?.Body, SelectTableInfoType.LeftJoin);
|
||||
}
|
||||
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>.Join(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, bool>> exp) => (this as ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>).InnerJoin(exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>.InnerJoin(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, bool>> exp)
|
||||
{
|
||||
if (exp == null) return this.InternalJoin(exp?.Body, SelectTableInfoType.LeftJoin);
|
||||
@@ -7213,6 +7424,7 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return (this as ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>).LeftJoin((Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, bool>>)expModify);
|
||||
}
|
||||
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>.Join(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>, bool>> exp) => (this as ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>).InnerJoin(exp);
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>.InnerJoin(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>, bool>> exp)
|
||||
{
|
||||
var expModify = new CommonExpression.ReplaceHzyTupleToMultiParam().Modify(exp, _tables);
|
||||
@@ -7297,6 +7509,13 @@ namespace FreeSql.Internal.CommonProvider
|
||||
}
|
||||
Task<List<TDto>> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>.ToListAsync<TDto>(CancellationToken cancellationToken) => (this as ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>).ToListAsync(GetToListDtoSelector<TDto>(), cancellationToken);
|
||||
|
||||
async Task ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>.ToChunkAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken)
|
||||
{
|
||||
if (select == null || done == null) return;
|
||||
for (var a = 0; a < select.Parameters.Count; a++) _tables[a].Parameter = select.Parameters[a];
|
||||
await this.InternalToChunkAsync<TReturn>(select.Body, size, done, cancellationToken);
|
||||
}
|
||||
|
||||
Task<DataTable> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>.ToDataTableAsync<TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, TReturn>> select, CancellationToken cancellationToken)
|
||||
{
|
||||
if (select == null) return this.InternalToDataTableAsync(select?.Body, cancellationToken);
|
||||
@@ -7360,6 +7579,12 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return (this as ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>).ToListAsync((Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, TReturn>>)expModify, cancellationToken);
|
||||
}
|
||||
|
||||
Task ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>.ToChunkAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken)
|
||||
{
|
||||
var expModify = new CommonExpression.ReplaceHzyTupleToMultiParam().Modify(select, _tables);
|
||||
return (this as ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>).ToChunkAsync((Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, TReturn>>)expModify, size, done, cancellationToken);
|
||||
}
|
||||
|
||||
Task<DataTable> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>.ToDataTableAsync<TReturn>(Expression<Func<HzyTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>, TReturn>> select, CancellationToken cancellationToken)
|
||||
{
|
||||
var expModify = new CommonExpression.ReplaceHzyTupleToMultiParam().Modify(select, _tables);
|
||||
|
||||
@@ -249,7 +249,7 @@ namespace FreeSql.Internal.CommonProvider
|
||||
ret._transaction = _select._transaction;
|
||||
ret._whereGlobalFilter = new List<GlobalFilter.Item>(_select._whereGlobalFilter.ToArray());
|
||||
ret._cancel = _select._cancel;
|
||||
ret._params.AddRange(_select._params);
|
||||
//ret._params.AddRange(_select._params); //#1965 WithTempQueryParser 子查询参数化,押后添加参数
|
||||
if (ret._tables[0].Table == null) ret._tables[0].Table = TableInfo.GetDefaultTable(typeof(TDto));
|
||||
Select0Provider.WithTempQueryParser parser = null;
|
||||
_addFieldAlias = true; //解决:[Column(Name = "flevel") 与属性名不一致时,嵌套查询 bug
|
||||
@@ -275,6 +275,7 @@ namespace FreeSql.Internal.CommonProvider
|
||||
var sql = $"\r\n{this.ToSql(parser._insideSelectList[0].InsideField)}";
|
||||
ret.WithSql(sql);
|
||||
ret._diymemexpWithTempQuery = parser;
|
||||
ret._params.AddRange(_select._params);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -56,6 +56,7 @@ public interface ISelect<<#=NewStr #>> : ISelect0<ISelect<<#=NewStr #>>, T1> <#=
|
||||
Task<DataTable> ToDataTableAsync<TReturn>(Expression<Func<<#=NewStr #>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<List<TReturn>> ToListAsync<TReturn>(Expression<Func<<#=NewStr #>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<List<TDto>> ToListAsync<TDto>(CancellationToken cancellationToken = default);
|
||||
Task ToChunkAsync<TReturn>(Expression<Func<<#=NewStr #>, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken = default);
|
||||
|
||||
Task<TReturn> ToOneAsync<TReturn>(Expression<Func<<#=NewStr #>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<TReturn> FirstAsync<TReturn>(Expression<Func<<#=NewStr #>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
@@ -73,6 +74,7 @@ public interface ISelect<<#=NewStr #>> : ISelect0<ISelect<<#=NewStr #>>, T1> <#=
|
||||
Task<int> InsertIntoAsync<TTargetEntity>(string tableName, Expression<Func<HzyTuple<<#=NewStr #>>, TTargetEntity>> select, CancellationToken cancellationToken = default) where TTargetEntity : class;
|
||||
Task<DataTable> ToDataTableAsync<TReturn>(Expression<Func<HzyTuple<<#=NewStr #>>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<List<TReturn>> ToListAsync<TReturn>(Expression<Func<HzyTuple<<#=NewStr #>>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task ToChunkAsync<TReturn>(Expression<Func<HzyTuple<<#=NewStr #>>, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken = default);
|
||||
|
||||
Task<TReturn> ToOneAsync<TReturn>(Expression<Func<HzyTuple<<#=NewStr #>>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
Task<TReturn> FirstAsync<TReturn>(Expression<Func<HzyTuple<<#=NewStr #>>, TReturn>> select, CancellationToken cancellationToken = default);
|
||||
@@ -106,6 +108,7 @@ public interface ISelect<<#=NewStr #>> : ISelect0<ISelect<<#=NewStr #>>, T1> <#=
|
||||
double Avg<TMember>(Expression<Func<<#=NewStr #>, TMember>> column);
|
||||
|
||||
ISelect<<#=NewStr #>> LeftJoin(Expression<Func<<#=NewStr #>, bool>> exp);
|
||||
ISelect<<#=NewStr #>> Join(Expression<Func<<#=NewStr #>, bool>> exp);
|
||||
ISelect<<#=NewStr #>> InnerJoin(Expression<Func<<#=NewStr #>, bool>> exp);
|
||||
ISelect<<#=NewStr #>> RightJoin(Expression<Func<<#=NewStr #>, bool>> exp);
|
||||
|
||||
@@ -141,6 +144,7 @@ public interface ISelect<<#=NewStr #>> : ISelect0<ISelect<<#=NewStr #>>, T1> <#=
|
||||
double Avg<TMember>(Expression<Func<HzyTuple<<#=NewStr #>>, TMember>> column);
|
||||
|
||||
ISelect<<#=NewStr #>> LeftJoin(Expression<Func<HzyTuple<<#=NewStr #>>, bool>> exp);
|
||||
ISelect<<#=NewStr #>> Join(Expression<Func<HzyTuple<<#=NewStr #>>, bool>> exp);
|
||||
ISelect<<#=NewStr #>> InnerJoin(Expression<Func<HzyTuple<<#=NewStr #>>, bool>> exp);
|
||||
ISelect<<#=NewStr #>> RightJoin(Expression<Func<HzyTuple<<#=NewStr #>>, bool>> exp);
|
||||
|
||||
|
||||
@@ -214,7 +214,8 @@ namespace FreeSql.Internal.CommonProvider
|
||||
for (var a = 0; a < exp.Parameters.Count; a++) _tables[a].Parameter = exp.Parameters[a];
|
||||
return this.InternalJoin(exp?.Body, SelectTableInfoType.LeftJoin);
|
||||
}
|
||||
|
||||
|
||||
ISelect<<#=NewStr #>> ISelect<<#=NewStr #>>.Join(Expression<Func<<#=NewStr #>, bool>> exp) => (this as ISelect<<#=NewStr #>>).InnerJoin(exp);
|
||||
ISelect<<#=NewStr #>> ISelect<<#=NewStr #>>.InnerJoin(Expression<Func<<#=NewStr #>, bool>> exp)
|
||||
{
|
||||
if (exp == null) return this.InternalJoin(exp?.Body, SelectTableInfoType.LeftJoin);
|
||||
@@ -352,7 +353,8 @@ namespace FreeSql.Internal.CommonProvider
|
||||
var expModify = new CommonExpression.ReplaceHzyTupleToMultiParam().Modify(exp, _tables);
|
||||
return (this as ISelect<<#=NewStr #>>).LeftJoin((Expression<Func<<#=NewStr #>, bool>>)expModify);
|
||||
}
|
||||
|
||||
|
||||
ISelect<<#=NewStr #>> ISelect<<#=NewStr #>>.Join(Expression<Func<HzyTuple<<#=NewStr #>>, bool>> exp) => (this as ISelect<<#=NewStr #>>).InnerJoin(exp);
|
||||
ISelect<<#=NewStr #>> ISelect<<#=NewStr #>>.InnerJoin(Expression<Func<HzyTuple<<#=NewStr #>>, bool>> exp)
|
||||
{
|
||||
var expModify = new CommonExpression.ReplaceHzyTupleToMultiParam().Modify(exp, _tables);
|
||||
@@ -437,6 +439,13 @@ namespace FreeSql.Internal.CommonProvider
|
||||
}
|
||||
Task<List<TDto>> ISelect<<#=NewStr #>>.ToListAsync<TDto>(CancellationToken cancellationToken) => (this as ISelect<<#=NewStr #>>).ToListAsync(GetToListDtoSelector<TDto>(), cancellationToken);
|
||||
|
||||
async Task ISelect<<#=NewStr #>>.ToChunkAsync<TReturn>(Expression<Func<<#=NewStr #>, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken)
|
||||
{
|
||||
if (select == null || done == null) return;
|
||||
for (var a = 0; a < select.Parameters.Count; a++) _tables[a].Parameter = select.Parameters[a];
|
||||
await this.InternalToChunkAsync<TReturn>(select.Body, size, done, cancellationToken);
|
||||
}
|
||||
|
||||
Task<DataTable> ISelect<<#=NewStr #>>.ToDataTableAsync<TReturn>(Expression<Func<<#=NewStr #>, TReturn>> select, CancellationToken cancellationToken)
|
||||
{
|
||||
if (select == null) return this.InternalToDataTableAsync(select?.Body, cancellationToken);
|
||||
@@ -499,6 +508,12 @@ namespace FreeSql.Internal.CommonProvider
|
||||
var expModify = new CommonExpression.ReplaceHzyTupleToMultiParam().Modify(select, _tables);
|
||||
return (this as ISelect<<#=NewStr #>>).ToListAsync((Expression<Func<<#=NewStr #>, TReturn>>)expModify, cancellationToken);
|
||||
}
|
||||
|
||||
Task ISelect<<#=NewStr #>>.ToChunkAsync<TReturn>(Expression<Func<HzyTuple<<#=NewStr #>>, TReturn>> select, int size, Func<FetchCallbackArgs<List<TReturn>>, Task> done, CancellationToken cancellationToken)
|
||||
{
|
||||
var expModify = new CommonExpression.ReplaceHzyTupleToMultiParam().Modify(select, _tables);
|
||||
return (this as ISelect<<#=NewStr #>>).ToChunkAsync((Expression<Func<<#=NewStr #>, TReturn>>)expModify, size, done, cancellationToken);
|
||||
}
|
||||
|
||||
Task<DataTable> ISelect<<#=NewStr #>>.ToDataTableAsync<TReturn>(Expression<Func<HzyTuple<<#=NewStr #>>, TReturn>> select, CancellationToken cancellationToken)
|
||||
{
|
||||
|
||||
@@ -1727,10 +1727,12 @@ namespace FreeSql.Internal
|
||||
break;
|
||||
case DataType.MySql:
|
||||
case DataType.CustomMySql:
|
||||
if (dr.GetFieldType(index).FullName == "MySqlConnector.MySqlDateTime")
|
||||
switch (dr.GetFieldType(index).FullName)
|
||||
{
|
||||
if (dr.IsDBNull(index)) return null;
|
||||
return dr.GetDateTime(index);
|
||||
case "MySql.Data.Types.MySqlDateTime": //Allow Zero Datetime=True;
|
||||
case "MySqlConnector.MySqlDateTime":
|
||||
if (dr.IsDBNull(index)) return null;
|
||||
return dr.GetDateTime(index);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -2385,6 +2387,7 @@ namespace FreeSql.Internal
|
||||
Expression tryparseExp = null;
|
||||
Expression tryparseBooleanExp = null;
|
||||
ParameterExpression tryparseVarExp = null;
|
||||
ParameterExpression tryparseVarExpDecimal = null;
|
||||
switch (type.FullName)
|
||||
{
|
||||
case "System.Guid":
|
||||
@@ -2429,7 +2432,7 @@ namespace FreeSql.Internal
|
||||
Expression.Return(returnTarget, Expression.Convert(Expression.Call(MethodTimeSpanFromSeconds, tryparseVarDblExp), typeof(object))),
|
||||
Expression.Return(returnTarget, Expression.Convert(Expression.Default(typeOrg), typeof(object)))
|
||||
);
|
||||
if (TypeTimeOnly != null) timeSpanExp = Expression.IfThenElse(
|
||||
if (TypeTimeOnly != null && MethodTimeOnlyToTimeSpan != null) timeSpanExp = Expression.IfThenElse(
|
||||
Expression.TypeIs(valueExp, TypeTimeOnly),
|
||||
Expression.Return(returnTarget, Expression.Convert(Expression.Call(Expression.Convert(valueExp, TypeTimeOnly), MethodTimeOnlyToTimeSpan), typeof(object))),
|
||||
timeSpanExp
|
||||
@@ -2471,7 +2474,7 @@ namespace FreeSql.Internal
|
||||
Expression.Return(returnTarget, Expression.Convert(Expression.MakeMemberAccess(Expression.Convert(valueExp, typeof(DateTimeOffset)), PropertyDateTimeOffsetDateTime), typeof(object))),
|
||||
Expression.Return(returnTarget, Expression.Convert(Expression.Default(typeOrg), typeof(object)))
|
||||
);
|
||||
if (TypeDateOnly != null) dateTimeExp = Expression.IfThenElse(
|
||||
if (TypeDateOnly != null && MethodDateOnlyToDateTime != null) dateTimeExp = Expression.IfThenElse(
|
||||
Expression.TypeIs(valueExp, TypeDateOnly),
|
||||
Expression.Return(returnTarget, Expression.Convert(Expression.Call(Expression.Convert(valueExp, TypeDateOnly), MethodDateOnlyToDateTime, Expression.Constant(TypeTimeOnly.CreateInstanceGetDefaultValue(), TypeTimeOnly)), typeof(object))),
|
||||
dateTimeExp
|
||||
@@ -2531,36 +2534,48 @@ namespace FreeSql.Internal
|
||||
break;
|
||||
case "System.Int16":
|
||||
tryparseExp = Expression.Block(
|
||||
new[] { tryparseVarExp = Expression.Variable(typeof(short)) },
|
||||
new[] { tryparseVarExp = Expression.Variable(typeof(short)), tryparseVarExpDecimal = Expression.Variable(typeof(decimal)) },
|
||||
new Expression[] {
|
||||
Expression.IfThenElse(
|
||||
Expression.IsTrue(Expression.Call(MethodShortTryParse, Expression.Convert(valueExp, typeof(string)), Expression.Constant(System.Globalization.NumberStyles.Any), Expression.Constant(null, typeof(IFormatProvider)), tryparseVarExp)),
|
||||
Expression.Return(returnTarget, Expression.Convert(tryparseVarExp, typeof(object))),
|
||||
Expression.Return(returnTarget, Expression.Convert(Expression.Default(typeOrg), typeof(object)))
|
||||
Expression.IfThenElse(
|
||||
Expression.IsTrue(Expression.Call(MethodDecimalTryParse, Expression.Convert(valueExp, typeof(string)), Expression.Constant(System.Globalization.NumberStyles.Any), Expression.Constant(null, typeof(IFormatProvider)), tryparseVarExpDecimal)),
|
||||
Expression.Return(returnTarget, Expression.Convert(Expression.Convert(tryparseVarExpDecimal, tryparseVarExp.Type), typeof(object))),
|
||||
Expression.Return(returnTarget, Expression.Convert(Expression.Default(typeOrg), typeof(object)))
|
||||
)
|
||||
)
|
||||
}
|
||||
);
|
||||
break;
|
||||
case "System.Int32":
|
||||
tryparseExp = Expression.Block(
|
||||
new[] { tryparseVarExp = Expression.Variable(typeof(int)) },
|
||||
new[] { tryparseVarExp = Expression.Variable(typeof(int)), tryparseVarExpDecimal = Expression.Variable(typeof(decimal)) },
|
||||
new Expression[] {
|
||||
Expression.IfThenElse(
|
||||
Expression.IsTrue(Expression.Call(MethodIntTryParse, Expression.Convert(valueExp, typeof(string)), Expression.Constant(System.Globalization.NumberStyles.Any), Expression.Constant(null, typeof(IFormatProvider)), tryparseVarExp)),
|
||||
Expression.Return(returnTarget, Expression.Convert(tryparseVarExp, typeof(object))),
|
||||
Expression.Return(returnTarget, Expression.Convert(Expression.Default(typeOrg), typeof(object)))
|
||||
Expression.IfThenElse(
|
||||
Expression.IsTrue(Expression.Call(MethodDecimalTryParse, Expression.Convert(valueExp, typeof(string)), Expression.Constant(System.Globalization.NumberStyles.Any), Expression.Constant(null, typeof(IFormatProvider)), tryparseVarExpDecimal)),
|
||||
Expression.Return(returnTarget, Expression.Convert(Expression.Convert(tryparseVarExpDecimal, tryparseVarExp.Type), typeof(object))),
|
||||
Expression.Return(returnTarget, Expression.Convert(Expression.Default(typeOrg), typeof(object)))
|
||||
)
|
||||
)
|
||||
}
|
||||
);
|
||||
break;
|
||||
case "System.Int64":
|
||||
tryparseExp = Expression.Block(
|
||||
new[] { tryparseVarExp = Expression.Variable(typeof(long)) },
|
||||
new[] { tryparseVarExp = Expression.Variable(typeof(long)), tryparseVarExpDecimal = Expression.Variable(typeof(decimal)) },
|
||||
new Expression[] {
|
||||
Expression.IfThenElse(
|
||||
Expression.IsTrue(Expression.Call(MethodLongTryParse, Expression.Convert(valueExp, typeof(string)), Expression.Constant(System.Globalization.NumberStyles.Any), Expression.Constant(null, typeof(IFormatProvider)), tryparseVarExp)),
|
||||
Expression.Return(returnTarget, Expression.Convert(tryparseVarExp, typeof(object))),
|
||||
Expression.Return(returnTarget, Expression.Convert(Expression.Default(typeOrg), typeof(object)))
|
||||
Expression.IfThenElse(
|
||||
Expression.IsTrue(Expression.Call(MethodDecimalTryParse, Expression.Convert(valueExp, typeof(string)), Expression.Constant(System.Globalization.NumberStyles.Any), Expression.Constant(null, typeof(IFormatProvider)), tryparseVarExpDecimal)),
|
||||
Expression.Return(returnTarget, Expression.Convert(Expression.Convert(tryparseVarExpDecimal, tryparseVarExp.Type), typeof(object))),
|
||||
Expression.Return(returnTarget, Expression.Convert(Expression.Default(typeOrg), typeof(object)))
|
||||
)
|
||||
)
|
||||
}
|
||||
);
|
||||
@@ -2579,36 +2594,48 @@ namespace FreeSql.Internal
|
||||
break;
|
||||
case "System.UInt16":
|
||||
tryparseExp = Expression.Block(
|
||||
new[] { tryparseVarExp = Expression.Variable(typeof(ushort)) },
|
||||
new[] { tryparseVarExp = Expression.Variable(typeof(ushort)), tryparseVarExpDecimal = Expression.Variable(typeof(decimal)) },
|
||||
new Expression[] {
|
||||
Expression.IfThenElse(
|
||||
Expression.IsTrue(Expression.Call(MethodUShortTryParse, Expression.Convert(valueExp, typeof(string)), Expression.Constant(System.Globalization.NumberStyles.Any), Expression.Constant(null, typeof(IFormatProvider)), tryparseVarExp)),
|
||||
Expression.Return(returnTarget, Expression.Convert(tryparseVarExp, typeof(object))),
|
||||
Expression.Return(returnTarget, Expression.Convert(Expression.Default(typeOrg), typeof(object)))
|
||||
Expression.IfThenElse(
|
||||
Expression.IsTrue(Expression.Call(MethodDecimalTryParse, Expression.Convert(valueExp, typeof(string)), Expression.Constant(System.Globalization.NumberStyles.Any), Expression.Constant(null, typeof(IFormatProvider)), tryparseVarExpDecimal)),
|
||||
Expression.Return(returnTarget, Expression.Convert(Expression.Convert(tryparseVarExpDecimal, tryparseVarExp.Type), typeof(object))),
|
||||
Expression.Return(returnTarget, Expression.Convert(Expression.Default(typeOrg), typeof(object)))
|
||||
)
|
||||
)
|
||||
}
|
||||
);
|
||||
break;
|
||||
case "System.UInt32":
|
||||
tryparseExp = Expression.Block(
|
||||
new[] { tryparseVarExp = Expression.Variable(typeof(uint)) },
|
||||
new[] { tryparseVarExp = Expression.Variable(typeof(uint)), tryparseVarExpDecimal = Expression.Variable(typeof(decimal)) },
|
||||
new Expression[] {
|
||||
Expression.IfThenElse(
|
||||
Expression.IsTrue(Expression.Call(MethodUIntTryParse, Expression.Convert(valueExp, typeof(string)), Expression.Constant(System.Globalization.NumberStyles.Any), Expression.Constant(null, typeof(IFormatProvider)), tryparseVarExp)),
|
||||
Expression.Return(returnTarget, Expression.Convert(tryparseVarExp, typeof(object))),
|
||||
Expression.Return(returnTarget, Expression.Convert(Expression.Default(typeOrg), typeof(object)))
|
||||
Expression.IfThenElse(
|
||||
Expression.IsTrue(Expression.Call(MethodDecimalTryParse, Expression.Convert(valueExp, typeof(string)), Expression.Constant(System.Globalization.NumberStyles.Any), Expression.Constant(null, typeof(IFormatProvider)), tryparseVarExpDecimal)),
|
||||
Expression.Return(returnTarget, Expression.Convert(Expression.Convert(tryparseVarExpDecimal, tryparseVarExp.Type), typeof(object))),
|
||||
Expression.Return(returnTarget, Expression.Convert(Expression.Default(typeOrg), typeof(object)))
|
||||
)
|
||||
)
|
||||
}
|
||||
);
|
||||
break;
|
||||
case "System.UInt64":
|
||||
tryparseExp = Expression.Block(
|
||||
new[] { tryparseVarExp = Expression.Variable(typeof(ulong)) },
|
||||
new[] { tryparseVarExp = Expression.Variable(typeof(ulong)), tryparseVarExpDecimal = Expression.Variable(typeof(decimal)) },
|
||||
new Expression[] {
|
||||
Expression.IfThenElse(
|
||||
Expression.IsTrue(Expression.Call(MethodULongTryParse, Expression.Convert(valueExp, typeof(string)), Expression.Constant(System.Globalization.NumberStyles.Any), Expression.Constant(null, typeof(IFormatProvider)), tryparseVarExp)),
|
||||
Expression.Return(returnTarget, Expression.Convert(tryparseVarExp, typeof(object))),
|
||||
Expression.Return(returnTarget, Expression.Convert(Expression.Default(typeOrg), typeof(object)))
|
||||
Expression.IfThenElse(
|
||||
Expression.IsTrue(Expression.Call(MethodDecimalTryParse, Expression.Convert(valueExp, typeof(string)), Expression.Constant(System.Globalization.NumberStyles.Any), Expression.Constant(null, typeof(IFormatProvider)), tryparseVarExpDecimal)),
|
||||
Expression.Return(returnTarget, Expression.Convert(Expression.Convert(tryparseVarExpDecimal, tryparseVarExp.Type), typeof(object))),
|
||||
Expression.Return(returnTarget, Expression.Convert(Expression.Default(typeOrg), typeof(object)))
|
||||
)
|
||||
)
|
||||
}
|
||||
);
|
||||
|
||||
@@ -462,8 +462,9 @@ where a.database in ({0}) and a.table in ({1})", tboldname ?? tbname);
|
||||
}
|
||||
|
||||
//创建临时表,数据导进临时表,然后删除原表,将临时表改名为原表名
|
||||
var newtablename = _commonUtils.QuoteSqlName(tbname[0], tbname[1]);
|
||||
var tablename = tboldname == null
|
||||
? _commonUtils.QuoteSqlName(tbname[0], tbname[1])
|
||||
? newtablename
|
||||
: _commonUtils.QuoteSqlName(tboldname[0], tboldname[1]);
|
||||
var tmptablename = _commonUtils.QuoteSqlName(tbname[0], $"FreeSqlTmp_{tbname[1]}");
|
||||
//创建临时表
|
||||
@@ -539,8 +540,7 @@ where a.database in ({0}) and a.table in ({1})", tboldname ?? tbname);
|
||||
|
||||
sb.Remove(sb.Length - 2, 2).Append(" FROM ").Append(tablename).Append(";\r\n");
|
||||
sb.Append("DROP TABLE ").Append(tablename).Append(";\r\n");
|
||||
sb.Append("RENAME TABLE ").Append(tmptablename).Append(" TO ")
|
||||
.Append(_commonUtils.QuoteSqlName(tbname[0], tbname[1])).Append(";\r\n");
|
||||
sb.Append("RENAME TABLE ").Append(tmptablename).Append(" TO ").Append(newtablename).Append(";\r\n");
|
||||
}
|
||||
|
||||
var res = sb.Length == 0 ? null : sb.ToString();
|
||||
|
||||
@@ -421,6 +421,19 @@ namespace FreeSql.ClickHouse
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public override string ExpressionLambdaToSqlCallDateDiff(string memberName, Expression date1, Expression date2, ExpTSC tsc)
|
||||
{
|
||||
Func<Expression, string> getExp = exparg => ExpressionLambdaToSql(exparg, tsc);
|
||||
switch (memberName)
|
||||
{
|
||||
case "TotalDays": return $"dateDiff(day,{getExp(date2)},toDateTime({getExp(date1)}))";
|
||||
case "TotalHours": return $"dateDiff(hour,{getExp(date2)},toDateTime({getExp(date1)}))";
|
||||
case "TotalMilliseconds": return $"dateDiff(millisecond, {getExp(date2)},toDateTime({getExp(date1)}))";
|
||||
case "TotalMinutes": return $"dateDiff(minute,{getExp(date2)},toDateTime({getExp(date1)}))";
|
||||
case "TotalSeconds": return $"dateDiff(second,{getExp(date2)},toDateTime({getExp(date1)}))";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public override string ExpressionLambdaToSqlCallDateTime(MethodCallExpression exp, ExpTSC tsc)
|
||||
{
|
||||
Func<Expression, string> getExp = exparg => ExpressionLambdaToSql(exparg, tsc);
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace FreeSql.ClickHouse.Curd
|
||||
sb.Append(_select);
|
||||
if (_distinct) sb.Append("DISTINCT ");
|
||||
sb.Append(field).Append(" \r\nFROM ");
|
||||
var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From).ToArray();
|
||||
var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent).ToArray();
|
||||
var tbsfrom = _tables.Where(a => a.Type == SelectTableInfoType.From).ToArray();
|
||||
for (var a = 0; a < tbsfrom.Length; a++)
|
||||
{
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<SignAssembly>False</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>key.snk</AssemblyOriginatorKeyFile>
|
||||
<DelaySign>false</DelaySign>
|
||||
<Version>3.5.103-preview20241205</Version>
|
||||
<Version>3.5.105-preview20250116</Version>
|
||||
<PackageReadmeFile>readme.md</PackageReadmeFile>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace FreeSql.Custom
|
||||
throw new NotImplementedException(CoreErrorStrings.S_NotImplementSkipOffset("Custom"));
|
||||
|
||||
sb.Append(" \r\nFROM ");
|
||||
var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From).ToArray();
|
||||
var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent).ToArray();
|
||||
var tbsfrom = _tables.Where(a => a.Type == SelectTableInfoType.From).ToArray();
|
||||
for (var a = 0; a < tbsfrom.Length; a++)
|
||||
{
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>key.snk</AssemblyOriginatorKeyFile>
|
||||
<DelaySign>false</DelaySign>
|
||||
<Version>3.5.103-preview20241205</Version>
|
||||
<Version>3.5.105-preview20250116</Version>
|
||||
<PackageReadmeFile>readme.md</PackageReadmeFile>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace FreeSql.Custom.MySql
|
||||
sb.Append(_select);
|
||||
if (_distinct) sb.Append("DISTINCT ");
|
||||
sb.Append(field).Append(" \r\nFROM ");
|
||||
var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From).ToArray();
|
||||
var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent).ToArray();
|
||||
var tbsfrom = _tables.Where(a => a.Type == SelectTableInfoType.From).ToArray();
|
||||
for (var a = 0; a < tbsfrom.Length; a++)
|
||||
{
|
||||
|
||||
@@ -293,7 +293,8 @@ where a.table_schema IN ({0}) and a.table_name IN ({1}) and a.index_name <> 'PRI
|
||||
}
|
||||
|
||||
//创建临时表,数据导进临时表,然后删除原表,将临时表改名为原表名
|
||||
var tablename = tboldname == null ? _commonUtils.QuoteSqlName(tbname[0], tbname[1]) : _commonUtils.QuoteSqlName(tboldname[0], tboldname[1]);
|
||||
var newtablename = _commonUtils.QuoteSqlName(tbname[0], tbname[1]);
|
||||
var tablename = tboldname == null ? newtablename : _commonUtils.QuoteSqlName(tboldname[0], tboldname[1]);
|
||||
var tmptablename = _commonUtils.QuoteSqlName(tbname[0], $"FreeSqlTmp_{tbname[1]}");
|
||||
//创建临时表
|
||||
sb.Append("CREATE TABLE IF NOT EXISTS ").Append(tmptablename).Append(" ( ");
|
||||
@@ -347,7 +348,7 @@ where a.table_schema IN ({0}) and a.table_name IN ({1}) and a.index_name <> 'PRI
|
||||
{
|
||||
sb.Append("CREATE ");
|
||||
if (uk.IsUnique) sb.Append("UNIQUE ");
|
||||
sb.Append("INDEX ").Append(_commonUtils.QuoteSqlName(ReplaceIndexName(uk.Name, tbname[1]))).Append(" ON ").Append(tablename).Append("(");
|
||||
sb.Append("INDEX ").Append(_commonUtils.QuoteSqlName(ReplaceIndexName(uk.Name, tbname[1]))).Append(" ON ").Append(newtablename).Append("(");
|
||||
foreach (var tbcol in uk.Columns)
|
||||
{
|
||||
sb.Append(_commonUtils.QuoteSqlName(tbcol.Column.Attribute.Name));
|
||||
|
||||
@@ -379,6 +379,18 @@ namespace FreeSql.Custom.MySql
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public override string ExpressionLambdaToSqlCallDateDiff(string memberName, Expression date1, Expression date2, ExpTSC tsc)
|
||||
{
|
||||
Func<Expression, string> getExp = exparg => ExpressionLambdaToSql(exparg, tsc);
|
||||
switch (memberName)
|
||||
{
|
||||
case "TotalDays": return $"timestampdiff(day,{getExp(date2)},{getExp(date1)})";
|
||||
case "TotalHours": return $"timestampdiff(hour,{getExp(date2)},{getExp(date1)})";
|
||||
case "TotalMinutes": return $"timestampdiff(minute,{getExp(date2)},{getExp(date1)})";
|
||||
case "TotalSeconds": return $"timestampdiff(second,{getExp(date2)},{getExp(date1)})";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public override string ExpressionLambdaToSqlCallDateTime(MethodCallExpression exp, ExpTSC tsc)
|
||||
{
|
||||
Func<Expression, string> getExp = exparg => ExpressionLambdaToSql(exparg, tsc);
|
||||
|
||||
@@ -23,9 +23,85 @@ namespace FreeSql.Custom.Oracle
|
||||
public override long ExecuteIdentity() => base.SplitExecuteIdentity(_batchValuesLimit > 0 ? _batchValuesLimit : 500, _batchParameterLimit > 0 ? _batchParameterLimit : 999);
|
||||
public override List<T1> ExecuteInserted() => base.SplitExecuteInserted(_batchValuesLimit > 0 ? _batchValuesLimit : 500, _batchParameterLimit > 0 ? _batchParameterLimit : 999);
|
||||
|
||||
/// <summary>
|
||||
/// 批量插入时,如果有序列 + DbInsertValue 设置,则用这个
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string ToSqlBatchIdentityColumn()
|
||||
{
|
||||
if (_source == null || _source.Any() == false) return null;
|
||||
_identCol = null;
|
||||
var cols = new List<ColumnInfo>();
|
||||
foreach (var col in _table.Columns.Values)
|
||||
{
|
||||
if (col.Attribute.IsIdentity) _identCol = col;
|
||||
if (col.Attribute.IsIdentity && _insertIdentity == false && string.IsNullOrEmpty(col.DbInsertValue)) continue;
|
||||
if (col.Attribute.IsIdentity == false && _ignore.ContainsKey(col.Attribute.Name)) continue;
|
||||
|
||||
cols.Add(col);
|
||||
}
|
||||
|
||||
var sb = new StringBuilder();
|
||||
var tmpsb = new StringBuilder();
|
||||
sb.Append("INSERT INTO ").Append(_commonUtils.QuoteSqlName(TableRuleInvoke())).Append("(");
|
||||
var colidx = 0;
|
||||
foreach (var col in cols)
|
||||
{
|
||||
if (colidx > 0)
|
||||
{
|
||||
sb.Append(", ");
|
||||
tmpsb.Append(", ");
|
||||
}
|
||||
var colname = _commonUtils.QuoteSqlName(col.Attribute.Name);
|
||||
sb.Append(colname);
|
||||
tmpsb.Append(col.Attribute.IsIdentity && !string.IsNullOrEmpty(col.DbInsertValue) ? col.DbInsertValue : colname);
|
||||
++colidx;
|
||||
}
|
||||
sb.Append(") ").Append("\r\nSELECT ").Append(tmpsb.ToString()).Append(" FROM ( \r\n");
|
||||
tmpsb.Clear();
|
||||
|
||||
_params = _noneParameter ? new DbParameter[0] : new DbParameter[colidx * _source.Count];
|
||||
var specialParams = new List<DbParameter>();
|
||||
var didx = 0;
|
||||
foreach (var d in _source)
|
||||
{
|
||||
if (didx > 0) sb.Append(" \r\nUNION ALL\r\n ");
|
||||
sb.Append(" SELECT ");
|
||||
var colidx2 = 0;
|
||||
foreach (var col in cols)
|
||||
{
|
||||
if (col.Attribute.IsIdentity && !string.IsNullOrEmpty(col.DbInsertValue)) continue;
|
||||
if (colidx2 > 0) sb.Append(", ");
|
||||
if (string.IsNullOrEmpty(col.DbInsertValue) == false && _ignoreInsertValueSql.ContainsKey(col.Attribute.Name) == false)
|
||||
sb.Append(col.DbInsertValue);
|
||||
else
|
||||
{
|
||||
object val = col.GetDbValue(d);
|
||||
if (val == null && col.Attribute.IsNullable == false) val = col.CsType == typeof(string) ? "" : Utils.GetDataReaderValue(col.CsType.NullableTypeOrThis(), null);//#384
|
||||
|
||||
var colsql = _noneParameter ? _commonUtils.GetNoneParamaterSqlValue(specialParams, _noneParameterFlag, col, col.Attribute.MapType, val) :
|
||||
_commonUtils.QuoteWriteParamterAdapter(col.Attribute.MapType, _commonUtils.QuoteParamterName($"{col.CsName}_{didx}"));
|
||||
sb.Append(_commonUtils.RewriteColumn(col, colsql));
|
||||
if (_noneParameter == false)
|
||||
_params[didx * colidx + colidx2] = _commonUtils.AppendParamter(null, $"{col.CsName}_{didx}", col, col.Attribute.MapType, val);
|
||||
}
|
||||
if (didx == 0) sb.Append(" as ").Append(_commonUtils.QuoteSqlName(col.Attribute.Name));
|
||||
++colidx2;
|
||||
}
|
||||
sb.Append(" FROM dual ");
|
||||
++didx;
|
||||
}
|
||||
sb.Append(" )");
|
||||
if (_noneParameter && specialParams.Any()) _params = specialParams.ToArray();
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
public override string ToSql()
|
||||
{
|
||||
if (_source == null || _source.Any() == false) return null;
|
||||
if (_source.Count > 1 && _table.Columns.Values.Any(col => col.Attribute.IsIdentity && !string.IsNullOrEmpty(col.DbInsertValue)))
|
||||
return ToSqlBatchIdentityColumn();
|
||||
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("INSERT ");
|
||||
if (_source.Count > 1) sb.Append("ALL");
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace FreeSql.Custom.Oracle
|
||||
|
||||
sbunion.Append(_select);
|
||||
if (_distinct) sbunion.Append("DISTINCT ");
|
||||
var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From).ToArray();
|
||||
var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent).ToArray();
|
||||
var tbsfrom = _tables.Where(a => a.Type == SelectTableInfoType.From).ToArray();
|
||||
|
||||
var isRownum = string.IsNullOrEmpty(_orderby) && _skip > 0;
|
||||
|
||||
@@ -312,7 +312,8 @@ and not exists(select 1 from all_constraints where constraint_name = a.index_nam
|
||||
sb.Append("execute immediate 'ALTER TABLE ").Append(_commonUtils.QuoteSqlName($"{tbname[0]}.{tbname[1]}")).Append(" DROP CONSTRAINT ").Append(_commonUtils.QuoteSqlName(oldpk)).Append("';\r\n");
|
||||
|
||||
//创建临时表,数据导进临时表,然后删除原表,将临时表改名为原表名
|
||||
var tablename = tboldname == null ? _commonUtils.QuoteSqlName($"{tbname[0]}.{tbname[1]}") : _commonUtils.QuoteSqlName($"{tboldname[0]}.{tboldname[1]}");
|
||||
var newtablename = _commonUtils.QuoteSqlName($"{tbname[0]}.{tbname[1]}");
|
||||
var tablename = tboldname == null ? newtablename : _commonUtils.QuoteSqlName($"{tboldname[0]}.{tboldname[1]}");
|
||||
var tmptablename = _commonUtils.QuoteSqlName($"{tbname[0]}.FTmp_{tbname[1]}");
|
||||
//创建临时表
|
||||
sb.Append("execute immediate 'CREATE TABLE ").Append(tmptablename).Append(" ( ");
|
||||
@@ -370,7 +371,7 @@ and not exists(select 1 from all_constraints where constraint_name = a.index_nam
|
||||
{
|
||||
sb.Append("execute immediate 'CREATE ");
|
||||
if (uk.IsUnique) sb.Append("UNIQUE ");
|
||||
sb.Append("INDEX ").Append(_commonUtils.QuoteSqlName(ReplaceIndexName(uk.Name, tbname[1]))).Append(" ON ").Append(tablename).Append("(");
|
||||
sb.Append("INDEX ").Append(_commonUtils.QuoteSqlName(ReplaceIndexName(uk.Name, tbname[1]))).Append(" ON ").Append(newtablename).Append("(");
|
||||
foreach (var tbcol in uk.Columns)
|
||||
{
|
||||
sb.Append(_commonUtils.QuoteSqlName(tbcol.Column.Attribute.Name));
|
||||
|
||||
@@ -384,6 +384,19 @@ namespace FreeSql.Custom.Oracle
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public override string ExpressionLambdaToSqlCallDateDiff(string memberName, Expression date1, Expression date2, ExpTSC tsc)
|
||||
{
|
||||
Func<Expression, string> getExp = exparg => ExpressionLambdaToSql(exparg, tsc);
|
||||
switch (memberName)
|
||||
{
|
||||
case "TotalDays": return $"(({getExp(date1)}+0)-({getExp(date2)}+0))";
|
||||
case "TotalHours": return $"((({getExp(date1)}+0)-({getExp(date2)}+0))*24)";
|
||||
case "TotalMilliseconds": return $"((({getExp(date1)}+0)-({getExp(date2)}+0))*{24 * 60 * 60 * 1000})";
|
||||
case "TotalMinutes": return $"((({getExp(date1)}+0)-({getExp(date2)}+0))*{24 * 60})";
|
||||
case "TotalSeconds": return $"((({getExp(date1)}+0)-({getExp(date2)}+0))*{24 * 60 * 60})";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public override string ExpressionLambdaToSqlCallDateTime(MethodCallExpression exp, ExpTSC tsc)
|
||||
{
|
||||
Func<Expression, string> getExp = exparg => ExpressionLambdaToSql(exparg, tsc);
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace FreeSql.Custom.PostgreSQL
|
||||
sb.Append(_select);
|
||||
if (_distinct) sb.Append("DISTINCT ");
|
||||
sb.Append(field).Append(" \r\nFROM ");
|
||||
var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From).ToArray();
|
||||
var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent).ToArray();
|
||||
var tbsfrom = _tables.Where(a => a.Type == SelectTableInfoType.From).ToArray();
|
||||
for (var a = 0; a < tbsfrom.Length; a++)
|
||||
{
|
||||
|
||||
@@ -386,7 +386,8 @@ where pg_namespace.nspname={0} and pg_class.relname={1} and pg_constraint.contyp
|
||||
sb.Append("ALTER TABLE ").Append(_commonUtils.QuoteSqlName($"{tbname[0]}.{tbname[1]}")).Append(" DROP CONSTRAINT ").Append(oldpk).Append(";\r\n");
|
||||
|
||||
//创建临时表,数据导进临时表,然后删除原表,将临时表改名为原表名
|
||||
var tablename = tboldname == null ? _commonUtils.QuoteSqlName($"{tbname[0]}.{tbname[1]}") : _commonUtils.QuoteSqlName($"{tboldname[0]}.{tboldname[1]}");
|
||||
var newtablename = _commonUtils.QuoteSqlName($"{tbname[0]}.{tbname[1]}");
|
||||
var tablename = tboldname == null ? newtablename : _commonUtils.QuoteSqlName($"{tboldname[0]}.{tboldname[1]}");
|
||||
var tmptablename = _commonUtils.QuoteSqlName($"{tbname[0]}.FreeSqlTmp_{tbname[1]}");
|
||||
//创建临时表
|
||||
sb.Append("CREATE TABLE IF NOT EXISTS ").Append(tmptablename).Append(" ( ");
|
||||
@@ -448,7 +449,7 @@ where pg_namespace.nspname={0} and pg_class.relname={1} and pg_constraint.contyp
|
||||
if (uk.IsUnique) sb.Append("UNIQUE ");
|
||||
sb.Append("INDEX ");
|
||||
if (isPg95) sb.Append("IF NOT EXISTS ");
|
||||
sb.Append(_commonUtils.QuoteSqlName(ReplaceIndexName(uk.Name, tbname[1]))).Append(" ON ").Append(tablename).Append("(");
|
||||
sb.Append(_commonUtils.QuoteSqlName(ReplaceIndexName(uk.Name, tbname[1]))).Append(" ON ").Append(newtablename).Append("(");
|
||||
foreach (var tbcol in uk.Columns)
|
||||
{
|
||||
sb.Append(_commonUtils.QuoteSqlName(tbcol.Column.Attribute.Name));
|
||||
@@ -463,7 +464,7 @@ where pg_namespace.nspname={0} and pg_class.relname={1} and pg_constraint.contyp
|
||||
{
|
||||
if (tbcol.Attribute.IsIdentity)
|
||||
{
|
||||
var maxval = _orm.Ado.QuerySingle<int>($"select max({_commonUtils.QuoteSqlName(tbcol.Attribute.Name)}) from {tablename}");
|
||||
var maxval = _orm.Ado.QuerySingle<int>($"select max({_commonUtils.QuoteSqlName(tbcol.Attribute.Name)}) from {newtablename}");
|
||||
if (maxval > 0)
|
||||
{
|
||||
sb.Append("ALTER TABLE ").Append(_commonUtils.QuoteSqlName($"{tbname[0]}.{tbname[1]}")).Append(" ALTER COLUMN ").Append(_commonUtils.QuoteSqlName(tbcol.Attribute.Name)).Append(" SET GENERATED BY DEFAULT");
|
||||
|
||||
@@ -63,7 +63,7 @@ namespace FreeSql.Custom.SqlServer
|
||||
if (_skip > 0) // 注意这个判断,大于 0 才使用 ROW_NUMBER ,否则属于第一页直接使用 TOP
|
||||
rownum = $", ROW_NUMBER() OVER({_orderby.Trim('\r', '\n', ' ')}) AS __rownum__";
|
||||
}
|
||||
var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From).ToArray();
|
||||
var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent).ToArray();
|
||||
var tbsfrom = _tables.Where(a => a.Type == SelectTableInfoType.From).ToArray();
|
||||
if (string.IsNullOrEmpty(rownum) == false && field == "*")
|
||||
sb.Append(tbsfrom[0].Alias).Append("."); //#1519 bug
|
||||
@@ -191,7 +191,7 @@ namespace FreeSql.Custom.SqlServer
|
||||
if (_skip <= 0 && _limit > 0) sb.Append("TOP ").Append(_limit).Append(" ");
|
||||
sb.Append(field);
|
||||
sb.Append(" \r\nFROM ");
|
||||
var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From).ToArray();
|
||||
var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent).ToArray();
|
||||
var tbsfrom = _tables.Where(a => a.Type == SelectTableInfoType.From).ToArray();
|
||||
for (var a = 0; a < tbsfrom.Length; a++)
|
||||
{
|
||||
|
||||
@@ -361,7 +361,8 @@ use [" + database + "];", tboldname ?? tbname);
|
||||
}
|
||||
//创建临时表,数据导进临时表,然后删除原表,将临时表改名为原表名
|
||||
bool idents = false;
|
||||
var tablename = tboldname == null ? _commonUtils.QuoteSqlName(tbname[0], tbname[1], tbname[2]) : _commonUtils.QuoteSqlName(tboldname[0], tboldname[1], tboldname[2]);
|
||||
var newtablename = _commonUtils.QuoteSqlName(tbname[0], tbname[1], tbname[2]);
|
||||
var tablename = tboldname == null ? newtablename : _commonUtils.QuoteSqlName(tboldname[0], tboldname[1], tboldname[2]);
|
||||
var tmptablename = _commonUtils.QuoteSqlName(tbname[0], tbname[1], $"FreeSqlTmp_{tbname[2]}");
|
||||
sb.Append("BEGIN TRANSACTION\r\n")
|
||||
.Append("SET QUOTED_IDENTIFIER ON\r\n")
|
||||
@@ -438,7 +439,7 @@ use [" + database + "];", tboldname ?? tbname);
|
||||
{
|
||||
sb.Append("CREATE ");
|
||||
if (uk.IsUnique) sb.Append("UNIQUE ");
|
||||
sb.Append("INDEX ").Append(_commonUtils.QuoteSqlName(ReplaceIndexName(uk.Name, tbname[1]))).Append(" ON ").Append(tablename).Append("(");
|
||||
sb.Append("INDEX ").Append(_commonUtils.QuoteSqlName(ReplaceIndexName(uk.Name, tbname[1]))).Append(" ON ").Append(newtablename).Append("(");
|
||||
foreach (var tbcol in uk.Columns)
|
||||
{
|
||||
sb.Append(_commonUtils.QuoteSqlName(tbcol.Column.Attribute.Name));
|
||||
|
||||
@@ -381,6 +381,19 @@ namespace FreeSql.Custom.SqlServer
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public override string ExpressionLambdaToSqlCallDateDiff(string memberName, Expression date1, Expression date2, ExpTSC tsc)
|
||||
{
|
||||
Func<Expression, string> getExp = exparg => ExpressionLambdaToSql(exparg, tsc);
|
||||
switch (memberName)
|
||||
{
|
||||
case "TotalDays": return $"datediff(day,{getExp(date2)},{getExp(date1)})";
|
||||
case "TotalHours": return $"datediff(hour,{getExp(date2)},{getExp(date1)})";
|
||||
case "TotalMilliseconds": return $"datediff(millisecond,{getExp(date2)},{getExp(date1)})";
|
||||
case "TotalMinutes": return $"datediff(minute,{getExp(date2)},{getExp(date1)})";
|
||||
case "TotalSeconds": return $"datediff(second,{getExp(date2)},{getExp(date1)})";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public override string ExpressionLambdaToSqlCallDateTime(MethodCallExpression exp, ExpTSC tsc)
|
||||
{
|
||||
Func<Expression, string> getExp = exparg => ExpressionLambdaToSql(exparg, tsc);
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace FreeSql.Dameng.Curd
|
||||
|
||||
sbunion.Append(_select);
|
||||
if (_distinct) sbunion.Append("DISTINCT ");
|
||||
var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From).ToArray();
|
||||
var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent).ToArray();
|
||||
var tbsfrom = _tables.Where(a => a.Type == SelectTableInfoType.From).ToArray();
|
||||
|
||||
var isRownum = string.IsNullOrEmpty(_orderby) && _skip > 0;
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace FreeSql.Dameng
|
||||
SlavePools.Add(slavePool);
|
||||
});
|
||||
}
|
||||
public override object AddslashesProcessParam(object param, Type mapType, ColumnInfo mapColumn)
|
||||
public override object AddslashesProcessParam(object param, Type mapType, Internal.Model.ColumnInfo mapColumn)
|
||||
{
|
||||
if (param == null) return "NULL";
|
||||
if (mapType != null && mapType != param.GetType() && (param is IEnumerable == false))
|
||||
|
||||
@@ -83,7 +83,7 @@ namespace FreeSql.Dameng
|
||||
{
|
||||
userId = DamengConnectionPool.GetUserId(conn.Value.ConnectionString);
|
||||
}
|
||||
var seqcols = new List<NativeTuple<ColumnInfo, string[], bool>>(); //序列:列,表,自增
|
||||
var seqcols = new List<NativeTuple<Internal.Model.ColumnInfo, string[], bool>>(); //序列:列,表,自增
|
||||
var seqnameDel = new List<string>(); //要删除的序列+触发器
|
||||
|
||||
var sb = new StringBuilder();
|
||||
@@ -316,7 +316,8 @@ and not exists(select 1 from all_constraints where index_name = a.index_name and
|
||||
//执行失败(语句1) 试图删除聚集主键
|
||||
|
||||
//创建临时表,数据导进临时表,然后删除原表,将临时表改名为原表名
|
||||
var tablename = tboldname == null ? _commonUtils.QuoteSqlName($"{tbname[0]}.{tbname[1]}") : _commonUtils.QuoteSqlName($"{tboldname[0]}.{tboldname[1]}");
|
||||
var newtablename = _commonUtils.QuoteSqlName($"{tbname[0]}.{tbname[1]}");
|
||||
var tablename = tboldname == null ? newtablename : _commonUtils.QuoteSqlName($"{tboldname[0]}.{tboldname[1]}");
|
||||
var tmptablename = _commonUtils.QuoteSqlName($"{tbname[0]}.FTmp_{tbname[1]}");
|
||||
//创建临时表
|
||||
sb.Append("execute immediate 'CREATE TABLE ").Append(tmptablename).Append(" ( ");
|
||||
@@ -386,7 +387,7 @@ and not exists(select 1 from all_constraints where index_name = a.index_name and
|
||||
{
|
||||
sb.Append("execute immediate 'CREATE ");
|
||||
if (uk.IsUnique) sb.Append("UNIQUE ");
|
||||
sb.Append("INDEX ").Append(_commonUtils.QuoteSqlName(ReplaceIndexName(uk.Name, tbname[1]))).Append(" ON ").Append(tablename).Append("(");
|
||||
sb.Append("INDEX ").Append(_commonUtils.QuoteSqlName(ReplaceIndexName(uk.Name, tbname[1]))).Append(" ON ").Append(newtablename).Append("(");
|
||||
foreach (var tbcol in uk.Columns)
|
||||
{
|
||||
sb.Append(_commonUtils.QuoteSqlName(tbcol.Column.Attribute.Name));
|
||||
|
||||
@@ -384,6 +384,19 @@ namespace FreeSql.Dameng
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public override string ExpressionLambdaToSqlCallDateDiff(string memberName, Expression date1, Expression date2, ExpTSC tsc)
|
||||
{
|
||||
Func<Expression, string> getExp = exparg => ExpressionLambdaToSql(exparg, tsc);
|
||||
switch (memberName)
|
||||
{
|
||||
case "TotalDays": return $"(cast({getExp(date1)} as timestamp with time zone)-{getExp(date2)})";
|
||||
case "TotalHours": return $"((cast({getExp(date1)} as timestamp with time zone)-{getExp(date2)})*24)";
|
||||
case "TotalMilliseconds": return $"((cast({getExp(date1)} as timestamp with time zone)-{getExp(date2)})*{24 * 60 * 60 * 1000})";
|
||||
case "TotalMinutes": return $"((cast({getExp(date1)} as timestamp with time zone)-{getExp(date2)})*{24 * 60})";
|
||||
case "TotalSeconds": return $"((cast({getExp(date1)} as timestamp with time zone)-{getExp(date2)})*{24 * 60 * 60})";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public override string ExpressionLambdaToSqlCallDateTime(MethodCallExpression exp, ExpTSC tsc)
|
||||
{
|
||||
Func<Expression, string> getExp = exparg => ExpressionLambdaToSql(exparg, tsc);
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace FreeSql.Dameng
|
||||
{
|
||||
}
|
||||
|
||||
public override DbParameter AppendParamter(List<DbParameter> _params, string parameterName, ColumnInfo col, Type type, object value)
|
||||
public override DbParameter AppendParamter(List<DbParameter> _params, string parameterName, Internal.Model.ColumnInfo col, Type type, object value)
|
||||
{
|
||||
if (string.IsNullOrEmpty(parameterName)) parameterName = $"p_{_params?.Count}";
|
||||
var dbtype = (DmDbType?)_orm.CodeFirst.GetDbInfo(type)?.type;
|
||||
@@ -114,7 +114,7 @@ namespace FreeSql.Dameng
|
||||
public override string QuoteWriteParamterAdapter(Type type, string paramterName) => paramterName;
|
||||
protected override string QuoteReadColumnAdapter(Type type, Type mapType, string columnName) => columnName;
|
||||
|
||||
public override string GetNoneParamaterSqlValue(List<DbParameter> specialParams, string specialParamFlag, ColumnInfo col, Type type, object value)
|
||||
public override string GetNoneParamaterSqlValue(List<DbParameter> specialParams, string specialParamFlag, Internal.Model.ColumnInfo col, Type type, object value)
|
||||
{
|
||||
if (value == null) return "NULL";
|
||||
if (type.IsNumberType()) return string.Format(CultureInfo.InvariantCulture, "{0}", value);
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<Title>$(AssemblyName)</Title>
|
||||
<IsPackable>true</IsPackable>
|
||||
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
|
||||
<Version>3.5.103-preview20241205</Version>
|
||||
<Version>3.5.105-preview20250116</Version>
|
||||
<PackageReadmeFile>readme.md</PackageReadmeFile>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -25,32 +25,20 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="lib\DmProvider\net6.0\DmProvider.dll" Pack="true" PackagePath="\lib\net6.0\" />
|
||||
<None Include="lib\DmProvider\netstandard2.0\DmProvider.dll" Pack="true" PackagePath="\lib\netstandard2.0\" />
|
||||
<None Include="lib\DmProvider\netcoreapp3.1\DmProvider.dll" Pack="true" PackagePath="\lib\netcoreapp3.1\" />
|
||||
<None Include="lib\DmProvider\net45\DmProvider.dll" Pack="true" PackagePath="\lib\net45\" />
|
||||
<None Include="lib\DmProvider\net40\DmProvider.dll" Pack="true" PackagePath="\lib\net40\" />
|
||||
<None Include="lib/**/*.dll">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="DM.DmProvider" Version="8.3.1.28188" />
|
||||
<PackageReference Include="System.Text.Encoding.CodePages" Version="5.0.0" Condition="'$(TargetFramework)' == 'netcoreapp3.1'" />
|
||||
<PackageReference Include="System.Text.Encoding.CodePages" Version="5.0.0" Condition="'$(TargetFramework)' == 'netstandard2.0'" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\FreeSql\FreeSql.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="DmProvider">
|
||||
<HintPath>lib\DmProvider\netstandard2.0\DmProvider.dll</HintPath>
|
||||
<Private>false</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
</ItemGroup>
|
||||
<PropertyGroup Condition="'$(TargetFramework)' == 'net6.0' or '$(TargetFramework)' == 'netcoreapp3.1' or '$(TargetFramework)' == 'netstandard2.0'">
|
||||
<DefineConstants>ns20;netstandard20</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>DmProvider</id>
|
||||
<version>1.1.0.17739</version>
|
||||
<authors>DM</authors>
|
||||
<description>DM .NET PROVIDER</description>
|
||||
<copyright>Copy right(C) DM</copyright>
|
||||
<dependencies>
|
||||
<group targetFramework=".NETFramework4.0" />
|
||||
<group targetFramework=".NETFramework4.5" />
|
||||
<group targetFramework=".NETCoreApp3.1">
|
||||
<dependency id="System.Text.Encoding.CodePages" version="5.0.0" exclude="Build,Analyzers" />
|
||||
</group>
|
||||
<group targetFramework="net6.0" />
|
||||
<group targetFramework=".NETStandard2.0">
|
||||
<dependency id="System.Text.Encoding.CodePages" version="5.0.0" exclude="Build,Analyzers" />
|
||||
</group>
|
||||
</dependencies>
|
||||
<frameworkAssemblies>
|
||||
<frameworkAssembly assemblyName="System.Transactions.dll" targetFramework=".NETFramework4.0, .NETFramework4.5" />
|
||||
</frameworkAssemblies>
|
||||
</metadata>
|
||||
</package>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -36,7 +36,7 @@ namespace FreeSql.Duckdb.Curd
|
||||
sb.Append(_select);
|
||||
if (_distinct) sb.Append("DISTINCT ");
|
||||
sb.Append(field).Append(" \r\nFROM ");
|
||||
var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From).ToArray();
|
||||
var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent).ToArray();
|
||||
var tbsfrom = _tables.Where(a => a.Type == SelectTableInfoType.From).ToArray();
|
||||
for (var a = 0; a < tbsfrom.Length; a++)
|
||||
{
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>key.snk</AssemblyOriginatorKeyFile>
|
||||
<DelaySign>false</DelaySign>
|
||||
<Version>3.5.103-preview20241205</Version>
|
||||
<Version>3.5.105-preview20250116</Version>
|
||||
<PackageReadmeFile>readme.md</PackageReadmeFile>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace FreeSql.Firebird.Curd
|
||||
|
||||
if (_distinct) sb.Append("DISTINCT ");
|
||||
sb.Append(field).Append(" \r\nFROM ");
|
||||
var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From).ToArray();
|
||||
var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent).ToArray();
|
||||
var tbsfrom = _tables.Where(a => a.Type == SelectTableInfoType.From).ToArray();
|
||||
for (var a = 0; a < tbsfrom.Length; a++)
|
||||
{
|
||||
|
||||
@@ -369,6 +369,19 @@ namespace FreeSql.Firebird
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public override string ExpressionLambdaToSqlCallDateDiff(string memberName, Expression date1, Expression date2, ExpTSC tsc)
|
||||
{
|
||||
Func<Expression, string> getExp = exparg => ExpressionLambdaToSql(exparg, tsc);
|
||||
switch (memberName)
|
||||
{
|
||||
case "TotalDays": return $"datediff(day from {getExp(date2)} to {getExp(date1)})";
|
||||
case "TotalHours": return $"datediff(hour from {getExp(date2)} to {getExp(date1)})";
|
||||
case "TotalMilliseconds": return $"datediff(millisecond from {getExp(date2)} to {getExp(date1)})";
|
||||
case "TotalMinutes": return $"datediff(minute from {getExp(date2)} to {getExp(date1)})";
|
||||
case "TotalSeconds": return $"datediff(second from {getExp(date2)} to {getExp(date1)})";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public override string ExpressionLambdaToSqlCallDateTime(MethodCallExpression exp, ExpTSC tsc)
|
||||
{
|
||||
Func<Expression, string> getExp = exparg => ExpressionLambdaToSql(exparg, tsc);
|
||||
|
||||
@@ -89,7 +89,8 @@ namespace FreeSql.Firebird
|
||||
if (value == null) return "NULL";
|
||||
if (type.IsNumberType()) return string.Format(CultureInfo.InvariantCulture, "{0}", value);
|
||||
if (type == typeof(byte[])) return $"x'{CommonUtils.BytesSqlRaw(value as byte[])}'";
|
||||
if (type == typeof(string) && col != null && (specialParamFlag == "c" || specialParamFlag == "cu")) return $"cast('{value.ToString().Replace("'", "''")}' as {col.Attribute.DbType})"; //#1923
|
||||
if (type == typeof(string) && col != null && (specialParamFlag == "c" || specialParamFlag == "cu"))
|
||||
return $"cast('{value.ToString().Replace("'", "''")}' as {col.Attribute.DbType.Replace("NOT NULL", "").Replace("NULL", "")})"; //#1923
|
||||
return FormatSql("{0}", value, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>key.snk</AssemblyOriginatorKeyFile>
|
||||
<DelaySign>false</DelaySign>
|
||||
<Version>3.5.103-preview20241205</Version>
|
||||
<Version>3.5.105-preview20250116</Version>
|
||||
<PackageReadmeFile>readme.md</PackageReadmeFile>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace FreeSql.GBase.Curd
|
||||
|
||||
if (_distinct) sb.Append("DISTINCT ");
|
||||
sb.Append(field).Append(" \r\nFROM ");
|
||||
var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From).ToArray();
|
||||
var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent).ToArray();
|
||||
var tbsfrom = _tables.Where(a => a.Type == SelectTableInfoType.From).ToArray();
|
||||
for (var a = 0; a < tbsfrom.Length; a++)
|
||||
{
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>key.snk</AssemblyOriginatorKeyFile>
|
||||
<DelaySign>false</DelaySign>
|
||||
<Version>3.5.103-preview20241205</Version>
|
||||
<Version>3.5.105-preview20250116</Version>
|
||||
<PackageReadmeFile>readme.md</PackageReadmeFile>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
@@ -369,6 +369,19 @@ namespace FreeSql.GBase
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public override string ExpressionLambdaToSqlCallDateDiff(string memberName, Expression date1, Expression date2, ExpTSC tsc)
|
||||
{
|
||||
Func<Expression, string> getExp = exparg => ExpressionLambdaToSql(exparg, tsc);
|
||||
switch (memberName)
|
||||
{
|
||||
case "TotalDays": return $"({getExp(date1)}-{getExp(date2)})";
|
||||
case "TotalHours": return $"(({getExp(date1)}-{getExp(date2)})*24)";
|
||||
case "TotalMilliseconds": return $"(({getExp(date1)}-{getExp(date2)})*{24 * 60 * 60 * 1000})";
|
||||
case "TotalMinutes": return $"(({getExp(date1)}-{getExp(date2)})*{24 * 60})";
|
||||
case "TotalSeconds": return $"(({getExp(date1)}-{getExp(date2)})*{24 * 60 * 60})";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public override string ExpressionLambdaToSqlCallDateTime(MethodCallExpression exp, ExpTSC tsc)
|
||||
{
|
||||
Func<Expression, string> getExp = exparg => ExpressionLambdaToSql(exparg, tsc);
|
||||
|
||||
@@ -5,6 +5,7 @@ using System.Collections.Generic;
|
||||
using System.Data.Common;
|
||||
using System.Data.Odbc;
|
||||
using System.Globalization;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace FreeSql.GBase
|
||||
{
|
||||
@@ -76,7 +77,21 @@ namespace FreeSql.GBase
|
||||
}
|
||||
public override string[] SplitTableName(string name) => name?.Split(new char[] { ':' }, 1);
|
||||
public override string QuoteParamterName(string name) => $"?{(_orm.CodeFirst.IsSyncStructureToLower ? name.ToLower() : name)}";
|
||||
public override string IsNull(string sql, object value) => $"nvl({sql}, {value})";
|
||||
|
||||
readonly static Regex _regDateTime = new Regex(@"^'(\d{4,4}\-\d{1,2}-\d{1,2} \d{1,2}:\d{1,2}:\d{1,2})(\.\d+)?'$", RegexOptions.Compiled);
|
||||
public override string IsNull(string sql, object value)
|
||||
{
|
||||
if (value is string valueStr)
|
||||
{
|
||||
var match = _regDateTime.Match(valueStr);
|
||||
if (match.Success)
|
||||
{
|
||||
if (string.IsNullOrEmpty(match.Groups[2].Value)) value = $"DATETIME({match.Groups[1].Value}) YEAR TO SECOND";
|
||||
else value = $"DATETIME({match.Groups[1].Value}{match.Groups[2].Value}) YEAR TO FRACTION({(match.Groups[2].Value.Length - 1)})";
|
||||
}
|
||||
}
|
||||
return $"nvl({sql}, {value})";
|
||||
}
|
||||
public override string StringConcat(string[] objs, Type[] types) => $"{string.Join(" || ", objs)}";
|
||||
public override string Mod(string left, string right, Type leftType, Type rightType) => $"mod({left},{right})";
|
||||
public override string Div(string left, string right, Type leftType, Type rightType) => $"trunc({left}/{right})";
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace FreeSql.KingbaseES
|
||||
sb.Append(_select);
|
||||
if (_distinct) sb.Append("DISTINCT ");
|
||||
sb.Append(field).Append(" \r\nFROM ");
|
||||
var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From).ToArray();
|
||||
var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent).ToArray();
|
||||
var tbsfrom = _tables.Where(a => a.Type == SelectTableInfoType.From).ToArray();
|
||||
for (var a = 0; a < tbsfrom.Length; a++)
|
||||
{
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<Title>$(AssemblyName)</Title>
|
||||
<IsPackable>true</IsPackable>
|
||||
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
|
||||
<Version>3.5.103-preview20241205</Version>
|
||||
<Version>3.5.105-preview20250116</Version>
|
||||
<PackageReadmeFile>readme.md</PackageReadmeFile>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -27,6 +27,10 @@
|
||||
<ItemGroup>
|
||||
<None Include="lib\Kdbndp.dll" Pack="true" PackagePath="\lib\netstandard2.0\" />
|
||||
<None Include="lib\Kdbndp.dll" Pack="true" PackagePath="\lib\net461\" />
|
||||
<None Include="lib\Kdbndp.dll" Pack="true" PackagePath="\lib\net6.0\" />
|
||||
<None Include="lib\Kdbndp.dll" Pack="true" PackagePath="\lib\net7.0\" />
|
||||
<None Include="lib\Kdbndp.dll" Pack="true" PackagePath="\lib\net8.0\" />
|
||||
<None Include="lib\Kdbndp.dll" Pack="true" PackagePath="\lib\net9.0\" />
|
||||
<None Include="lib/**/*.dll">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
|
||||
@@ -398,7 +398,8 @@ where {pg_}namespace.nspname={{0}} and {pg_}class.relname={{1}} and {pg_}constra
|
||||
sb.Append("ALTER TABLE ").Append(_commonUtils.QuoteSqlName($"{tbname[0]}.{tbname[1]}")).Append(" DROP CONSTRAINT ").Append(oldpk).Append(";\r\n");
|
||||
|
||||
//创建临时表,数据导进临时表,然后删除原表,将临时表改名为原表名
|
||||
var tablename = tboldname == null ? _commonUtils.QuoteSqlName($"{tbname[0]}.{tbname[1]}") : _commonUtils.QuoteSqlName($"{tboldname[0]}.{tboldname[1]}");
|
||||
var newtablename = _commonUtils.QuoteSqlName($"{tbname[0]}.{tbname[1]}");
|
||||
var tablename = tboldname == null ? newtablename : _commonUtils.QuoteSqlName($"{tboldname[0]}.{tboldname[1]}");
|
||||
var tmptablename = _commonUtils.QuoteSqlName($"{tbname[0]}.FTmp_{tbname[1]}");
|
||||
//创建临时表
|
||||
sb.Append("CREATE TABLE IF NOT EXISTS ").Append(tmptablename).Append(" ( ");
|
||||
@@ -453,7 +454,7 @@ where {pg_}namespace.nspname={{0}} and {pg_}class.relname={{1}} and {pg_}constra
|
||||
{
|
||||
sb.Append("CREATE ");
|
||||
if (uk.IsUnique) sb.Append("UNIQUE ");
|
||||
sb.Append("INDEX ").Append(_commonUtils.QuoteSqlName(ReplaceIndexName(uk.Name, tbname[1]))).Append(" ON ").Append(tablename).Append("(");
|
||||
sb.Append("INDEX ").Append(_commonUtils.QuoteSqlName(ReplaceIndexName(uk.Name, tbname[1]))).Append(" ON ").Append(newtablename).Append("(");
|
||||
foreach (var tbcol in uk.Columns)
|
||||
{
|
||||
sb.Append(_commonUtils.QuoteSqlName(tbcol.Column.Attribute.Name));
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace FreeSql.MsAccess.Curd
|
||||
sb.Append(" \r\nFROM ");
|
||||
var fromIndex = sb.Length;
|
||||
var ioinCounter = 0;
|
||||
var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From).ToArray();
|
||||
var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent).ToArray();
|
||||
var tbsfrom = _tables.Where(a => a.Type == SelectTableInfoType.From).ToArray();
|
||||
for (var a = 0; a < tbsfrom.Length; a++)
|
||||
{
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>key.snk</AssemblyOriginatorKeyFile>
|
||||
<DelaySign>false</DelaySign>
|
||||
<Version>3.5.103-preview20241205</Version>
|
||||
<Version>3.5.105-preview20250116</Version>
|
||||
<PackageReadmeFile>readme.md</PackageReadmeFile>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
@@ -321,6 +321,18 @@ namespace FreeSql.MsAccess
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public override string ExpressionLambdaToSqlCallDateDiff(string memberName, Expression date1, Expression date2, ExpTSC tsc)
|
||||
{
|
||||
Func<Expression, string> getExp = exparg => ExpressionLambdaToSql(exparg, tsc);
|
||||
switch (memberName)
|
||||
{
|
||||
case "TotalDays": return $"datediff('d',{getExp(date2)},{getExp(date1)})";
|
||||
case "TotalHours": return $"datediff('h',{getExp(date2)},{getExp(date1)})";
|
||||
case "TotalMinutes": return $"datediff('n',{getExp(date2)},{getExp(date1)})";
|
||||
case "TotalSeconds": return $"datediff('s',{getExp(date2)},{getExp(date1)})";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public override string ExpressionLambdaToSqlCallDateTime(MethodCallExpression exp, ExpTSC tsc)
|
||||
{
|
||||
Func<Expression, string> getExp = exparg => ExpressionLambdaToSql(exparg, tsc);
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace FreeSql.MySql.Curd
|
||||
sb.Append(_select);
|
||||
if (_distinct) sb.Append("DISTINCT ");
|
||||
sb.Append(field).Append(" \r\nFROM ");
|
||||
var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From).ToArray();
|
||||
var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent).ToArray();
|
||||
var tbsfrom = _tables.Where(a => a.Type == SelectTableInfoType.From).ToArray();
|
||||
for (var a = 0; a < tbsfrom.Length; a++)
|
||||
{
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>key.snk</AssemblyOriginatorKeyFile>
|
||||
<DelaySign>false</DelaySign>
|
||||
<Version>3.5.103-preview20241205</Version>
|
||||
<Version>3.5.105-preview20250116</Version>
|
||||
<PackageReadmeFile>readme.md</PackageReadmeFile>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
@@ -309,7 +309,8 @@ where a.table_schema IN ({0}) and a.table_name IN ({1}) and a.index_name <> 'PRI
|
||||
}
|
||||
|
||||
//创建临时表,数据导进临时表,然后删除原表,将临时表改名为原表名
|
||||
var tablename = tboldname == null ? _commonUtils.QuoteSqlName(tbname[0], tbname[1]) : _commonUtils.QuoteSqlName(tboldname[0], tboldname[1]);
|
||||
var newtablename = _commonUtils.QuoteSqlName(tbname[0], tbname[1]);
|
||||
var tablename = tboldname == null ? newtablename : _commonUtils.QuoteSqlName(tboldname[0], tboldname[1]);
|
||||
var tmptablename = _commonUtils.QuoteSqlName(tbname[0], $"FreeSqlTmp_{tbname[1]}");
|
||||
//创建临时表
|
||||
sb.Append("CREATE TABLE IF NOT EXISTS ").Append(tmptablename).Append(" ( ");
|
||||
@@ -363,7 +364,7 @@ where a.table_schema IN ({0}) and a.table_name IN ({1}) and a.index_name <> 'PRI
|
||||
{
|
||||
sb.Append("CREATE ");
|
||||
if (uk.IsUnique) sb.Append("UNIQUE ");
|
||||
sb.Append("INDEX ").Append(_commonUtils.QuoteSqlName(ReplaceIndexName(uk.Name, tbname[1]))).Append(" ON ").Append(tablename).Append("(");
|
||||
sb.Append("INDEX ").Append(_commonUtils.QuoteSqlName(ReplaceIndexName(uk.Name, tbname[1]))).Append(" ON ").Append(newtablename).Append("(");
|
||||
foreach (var tbcol in uk.Columns)
|
||||
{
|
||||
sb.Append(_commonUtils.QuoteSqlName(tbcol.Column.Attribute.Name));
|
||||
|
||||
@@ -381,6 +381,18 @@ namespace FreeSql.MySql
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public override string ExpressionLambdaToSqlCallDateDiff(string memberName, Expression date1, Expression date2, ExpTSC tsc)
|
||||
{
|
||||
Func<Expression, string> getExp = exparg => ExpressionLambdaToSql(exparg, tsc);
|
||||
switch (memberName)
|
||||
{
|
||||
case "TotalDays": return $"timestampdiff(day,{getExp(date2)},{getExp(date1)})";
|
||||
case "TotalHours": return $"timestampdiff(hour,{getExp(date2)},{getExp(date1)})";
|
||||
case "TotalMinutes": return $"timestampdiff(minute,{getExp(date2)},{getExp(date1)})";
|
||||
case "TotalSeconds": return $"timestampdiff(second,{getExp(date2)},{getExp(date1)})";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public override string ExpressionLambdaToSqlCallDateTime(MethodCallExpression exp, ExpTSC tsc)
|
||||
{
|
||||
Func<Expression, string> getExp = exparg => ExpressionLambdaToSql(exparg, tsc);
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>key.snk</AssemblyOriginatorKeyFile>
|
||||
<DelaySign>false</DelaySign>
|
||||
<Version>3.5.103-preview20241205</Version>
|
||||
<Version>3.5.105-preview20250116</Version>
|
||||
<PackageReadmeFile>readme.md</PackageReadmeFile>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace FreeSql.Odbc.Default
|
||||
throw new NotImplementedException(CoreErrorStrings.S_NotImplementSkipOffset("Default"));
|
||||
|
||||
sb.Append(" \r\nFROM ");
|
||||
var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From).ToArray();
|
||||
var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent).ToArray();
|
||||
var tbsfrom = _tables.Where(a => a.Type == SelectTableInfoType.From).ToArray();
|
||||
for (var a = 0; a < tbsfrom.Length; a++)
|
||||
{
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>key.snk</AssemblyOriginatorKeyFile>
|
||||
<DelaySign>false</DelaySign>
|
||||
<Version>3.5.103-preview20241205</Version>
|
||||
<Version>3.5.105-preview20250116</Version>
|
||||
<PackageReadmeFile>readme.md</PackageReadmeFile>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace FreeSql.Odbc.MySql
|
||||
sb.Append(_select);
|
||||
if (_distinct) sb.Append("DISTINCT ");
|
||||
sb.Append(field).Append(" \r\nFROM ");
|
||||
var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From).ToArray();
|
||||
var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent).ToArray();
|
||||
var tbsfrom = _tables.Where(a => a.Type == SelectTableInfoType.From).ToArray();
|
||||
for (var a = 0; a < tbsfrom.Length; a++)
|
||||
{
|
||||
|
||||
@@ -294,7 +294,8 @@ where a.table_schema IN ({0}) and a.table_name IN ({1}) and a.index_name <> 'PRI
|
||||
}
|
||||
|
||||
//创建临时表,数据导进临时表,然后删除原表,将临时表改名为原表名
|
||||
var tablename = tboldname == null ? _commonUtils.QuoteSqlName(tbname[0], tbname[1]) : _commonUtils.QuoteSqlName(tboldname[0], tboldname[1]);
|
||||
var newtablename = _commonUtils.QuoteSqlName(tbname[0], tbname[1]);
|
||||
var tablename = tboldname == null ? newtablename : _commonUtils.QuoteSqlName(tboldname[0], tboldname[1]);
|
||||
var tmptablename = _commonUtils.QuoteSqlName(tbname[0], $"FreeSqlTmp_{tbname[1]}");
|
||||
//创建临时表
|
||||
sb.Append("CREATE TABLE IF NOT EXISTS ").Append(tmptablename).Append(" ( ");
|
||||
@@ -348,7 +349,7 @@ where a.table_schema IN ({0}) and a.table_name IN ({1}) and a.index_name <> 'PRI
|
||||
{
|
||||
sb.Append("CREATE ");
|
||||
if (uk.IsUnique) sb.Append("UNIQUE ");
|
||||
sb.Append("INDEX ").Append(_commonUtils.QuoteSqlName(ReplaceIndexName(uk.Name, tbname[1]))).Append(" ON ").Append(tablename).Append("(");
|
||||
sb.Append("INDEX ").Append(_commonUtils.QuoteSqlName(ReplaceIndexName(uk.Name, tbname[1]))).Append(" ON ").Append(newtablename).Append("(");
|
||||
foreach (var tbcol in uk.Columns)
|
||||
{
|
||||
sb.Append(_commonUtils.QuoteSqlName(tbcol.Column.Attribute.Name));
|
||||
|
||||
@@ -379,6 +379,18 @@ namespace FreeSql.Odbc.MySql
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public override string ExpressionLambdaToSqlCallDateDiff(string memberName, Expression date1, Expression date2, ExpTSC tsc)
|
||||
{
|
||||
Func<Expression, string> getExp = exparg => ExpressionLambdaToSql(exparg, tsc);
|
||||
switch (memberName)
|
||||
{
|
||||
case "TotalDays": return $"timestampdiff(day,{getExp(date2)},{getExp(date1)})";
|
||||
case "TotalHours": return $"timestampdiff(hour,{getExp(date2)},{getExp(date1)})";
|
||||
case "TotalMinutes": return $"timestampdiff(minute,{getExp(date2)},{getExp(date1)})";
|
||||
case "TotalSeconds": return $"timestampdiff(second,{getExp(date2)},{getExp(date1)})";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public override string ExpressionLambdaToSqlCallDateTime(MethodCallExpression exp, ExpTSC tsc)
|
||||
{
|
||||
Func<Expression, string> getExp = exparg => ExpressionLambdaToSql(exparg, tsc);
|
||||
|
||||
@@ -23,9 +23,85 @@ namespace FreeSql.Odbc.Oracle
|
||||
public override long ExecuteIdentity() => base.SplitExecuteIdentity(_batchValuesLimit > 0 ? _batchValuesLimit : 500, _batchParameterLimit > 0 ? _batchParameterLimit : 999);
|
||||
public override List<T1> ExecuteInserted() => base.SplitExecuteInserted(_batchValuesLimit > 0 ? _batchValuesLimit : 500, _batchParameterLimit > 0 ? _batchParameterLimit : 999);
|
||||
|
||||
/// <summary>
|
||||
/// 批量插入时,如果有序列 + DbInsertValue 设置,则用这个
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string ToSqlBatchIdentityColumn()
|
||||
{
|
||||
if (_source == null || _source.Any() == false) return null;
|
||||
_identCol = null;
|
||||
var cols = new List<ColumnInfo>();
|
||||
foreach (var col in _table.Columns.Values)
|
||||
{
|
||||
if (col.Attribute.IsIdentity) _identCol = col;
|
||||
if (col.Attribute.IsIdentity && _insertIdentity == false && string.IsNullOrEmpty(col.DbInsertValue)) continue;
|
||||
if (col.Attribute.IsIdentity == false && _ignore.ContainsKey(col.Attribute.Name)) continue;
|
||||
|
||||
cols.Add(col);
|
||||
}
|
||||
|
||||
var sb = new StringBuilder();
|
||||
var tmpsb = new StringBuilder();
|
||||
sb.Append("INSERT INTO ").Append(_commonUtils.QuoteSqlName(TableRuleInvoke())).Append("(");
|
||||
var colidx = 0;
|
||||
foreach (var col in cols)
|
||||
{
|
||||
if (colidx > 0)
|
||||
{
|
||||
sb.Append(", ");
|
||||
tmpsb.Append(", ");
|
||||
}
|
||||
var colname = _commonUtils.QuoteSqlName(col.Attribute.Name);
|
||||
sb.Append(colname);
|
||||
tmpsb.Append(col.Attribute.IsIdentity && !string.IsNullOrEmpty(col.DbInsertValue) ? col.DbInsertValue : colname);
|
||||
++colidx;
|
||||
}
|
||||
sb.Append(") ").Append("\r\nSELECT ").Append(tmpsb.ToString()).Append(" FROM ( \r\n");
|
||||
tmpsb.Clear();
|
||||
|
||||
_params = _noneParameter ? new DbParameter[0] : new DbParameter[colidx * _source.Count];
|
||||
var specialParams = new List<DbParameter>();
|
||||
var didx = 0;
|
||||
foreach (var d in _source)
|
||||
{
|
||||
if (didx > 0) sb.Append(" \r\nUNION ALL\r\n ");
|
||||
sb.Append(" SELECT ");
|
||||
var colidx2 = 0;
|
||||
foreach (var col in cols)
|
||||
{
|
||||
if (col.Attribute.IsIdentity && !string.IsNullOrEmpty(col.DbInsertValue)) continue;
|
||||
if (colidx2 > 0) sb.Append(", ");
|
||||
if (string.IsNullOrEmpty(col.DbInsertValue) == false && _ignoreInsertValueSql.ContainsKey(col.Attribute.Name) == false)
|
||||
sb.Append(col.DbInsertValue);
|
||||
else
|
||||
{
|
||||
object val = col.GetDbValue(d);
|
||||
if (val == null && col.Attribute.IsNullable == false) val = col.CsType == typeof(string) ? "" : Utils.GetDataReaderValue(col.CsType.NullableTypeOrThis(), null);//#384
|
||||
|
||||
var colsql = _noneParameter ? _commonUtils.GetNoneParamaterSqlValue(specialParams, _noneParameterFlag, col, col.Attribute.MapType, val) :
|
||||
_commonUtils.QuoteWriteParamterAdapter(col.Attribute.MapType, _commonUtils.QuoteParamterName($"{col.CsName}_{didx}"));
|
||||
sb.Append(_commonUtils.RewriteColumn(col, colsql));
|
||||
if (_noneParameter == false)
|
||||
_params[didx * colidx + colidx2] = _commonUtils.AppendParamter(null, $"{col.CsName}_{didx}", col, col.Attribute.MapType, val);
|
||||
}
|
||||
if (didx == 0) sb.Append(" as ").Append(_commonUtils.QuoteSqlName(col.Attribute.Name));
|
||||
++colidx2;
|
||||
}
|
||||
sb.Append(" FROM dual ");
|
||||
++didx;
|
||||
}
|
||||
sb.Append(" )");
|
||||
if (_noneParameter && specialParams.Any()) _params = specialParams.ToArray();
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
public override string ToSql()
|
||||
{
|
||||
if (_source == null || _source.Any() == false) return null;
|
||||
if (_source.Count > 1 && _table.Columns.Values.Any(col => col.Attribute.IsIdentity && !string.IsNullOrEmpty(col.DbInsertValue)))
|
||||
return ToSqlBatchIdentityColumn();
|
||||
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("INSERT ");
|
||||
if (_source.Count > 1) sb.Append("ALL");
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace FreeSql.Odbc.Oracle
|
||||
|
||||
sbunion.Append(_select);
|
||||
if (_distinct) sbunion.Append("DISTINCT ");
|
||||
var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From).ToArray();
|
||||
var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent).ToArray();
|
||||
var tbsfrom = _tables.Where(a => a.Type == SelectTableInfoType.From).ToArray();
|
||||
|
||||
var isRownum = string.IsNullOrEmpty(_orderby) && _skip > 0;
|
||||
|
||||
@@ -314,7 +314,8 @@ and not exists(select 1 from all_constraints where constraint_name = a.index_nam
|
||||
sb.Append("execute immediate 'ALTER TABLE ").Append(_commonUtils.QuoteSqlName($"{tbname[0]}.{tbname[1]}")).Append(" DROP CONSTRAINT ").Append(_commonUtils.QuoteSqlName(oldpk)).Append("';\r\n");
|
||||
|
||||
//创建临时表,数据导进临时表,然后删除原表,将临时表改名为原表名
|
||||
var tablename = tboldname == null ? _commonUtils.QuoteSqlName($"{tbname[0]}.{tbname[1]}") : _commonUtils.QuoteSqlName($"{tboldname[0]}.{tboldname[1]}");
|
||||
var newtablename = _commonUtils.QuoteSqlName($"{tbname[0]}.{tbname[1]}");
|
||||
var tablename = tboldname == null ? newtablename : _commonUtils.QuoteSqlName($"{tboldname[0]}.{tboldname[1]}");
|
||||
var tmptablename = _commonUtils.QuoteSqlName($"{tbname[0]}.FTmp_{tbname[1]}");
|
||||
//创建临时表
|
||||
sb.Append("execute immediate 'CREATE TABLE ").Append(tmptablename).Append(" ( ");
|
||||
@@ -372,7 +373,7 @@ and not exists(select 1 from all_constraints where constraint_name = a.index_nam
|
||||
{
|
||||
sb.Append("execute immediate 'CREATE ");
|
||||
if (uk.IsUnique) sb.Append("UNIQUE ");
|
||||
sb.Append("INDEX ").Append(_commonUtils.QuoteSqlName(ReplaceIndexName(uk.Name, tbname[1]))).Append(" ON ").Append(tablename).Append("(");
|
||||
sb.Append("INDEX ").Append(_commonUtils.QuoteSqlName(ReplaceIndexName(uk.Name, tbname[1]))).Append(" ON ").Append(newtablename).Append("(");
|
||||
foreach (var tbcol in uk.Columns)
|
||||
{
|
||||
sb.Append(_commonUtils.QuoteSqlName(tbcol.Column.Attribute.Name));
|
||||
|
||||
@@ -384,6 +384,19 @@ namespace FreeSql.Odbc.Oracle
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public override string ExpressionLambdaToSqlCallDateDiff(string memberName, Expression date1, Expression date2, ExpTSC tsc)
|
||||
{
|
||||
Func<Expression, string> getExp = exparg => ExpressionLambdaToSql(exparg, tsc);
|
||||
switch (memberName)
|
||||
{
|
||||
case "TotalDays": return $"(({getExp(date1)}+0)-({getExp(date2)}+0))";
|
||||
case "TotalHours": return $"((({getExp(date1)}+0)-({getExp(date2)}+0))*24)";
|
||||
case "TotalMilliseconds": return $"((({getExp(date1)}+0)-({getExp(date2)}+0))*{24 * 60 * 60 * 1000})";
|
||||
case "TotalMinutes": return $"((({getExp(date1)}+0)-({getExp(date2)}+0))*{24 * 60})";
|
||||
case "TotalSeconds": return $"((({getExp(date1)}+0)-({getExp(date2)}+0))*{24 * 60 * 60})";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public override string ExpressionLambdaToSqlCallDateTime(MethodCallExpression exp, ExpTSC tsc)
|
||||
{
|
||||
Func<Expression, string> getExp = exparg => ExpressionLambdaToSql(exparg, tsc);
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace FreeSql.Odbc.PostgreSQL
|
||||
sb.Append(_select);
|
||||
if (_distinct) sb.Append("DISTINCT ");
|
||||
sb.Append(field).Append(" \r\nFROM ");
|
||||
var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From).ToArray();
|
||||
var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent).ToArray();
|
||||
var tbsfrom = _tables.Where(a => a.Type == SelectTableInfoType.From).ToArray();
|
||||
for (var a = 0; a < tbsfrom.Length; a++)
|
||||
{
|
||||
|
||||
@@ -387,7 +387,8 @@ where pg_namespace.nspname={0} and pg_class.relname={1} and pg_constraint.contyp
|
||||
sb.Append("ALTER TABLE ").Append(_commonUtils.QuoteSqlName($"{tbname[0]}.{tbname[1]}")).Append(" DROP CONSTRAINT ").Append(oldpk).Append(";\r\n");
|
||||
|
||||
//创建临时表,数据导进临时表,然后删除原表,将临时表改名为原表名
|
||||
var tablename = tboldname == null ? _commonUtils.QuoteSqlName($"{tbname[0]}.{tbname[1]}") : _commonUtils.QuoteSqlName($"{tboldname[0]}.{tboldname[1]}");
|
||||
var newtablename = _commonUtils.QuoteSqlName($"{tbname[0]}.{tbname[1]}");
|
||||
var tablename = tboldname == null ? newtablename : _commonUtils.QuoteSqlName($"{tboldname[0]}.{tboldname[1]}");
|
||||
var tmptablename = _commonUtils.QuoteSqlName($"{tbname[0]}.FreeSqlTmp_{tbname[1]}");
|
||||
//创建临时表
|
||||
sb.Append("CREATE TABLE IF NOT EXISTS ").Append(tmptablename).Append(" ( ");
|
||||
@@ -449,7 +450,7 @@ where pg_namespace.nspname={0} and pg_class.relname={1} and pg_constraint.contyp
|
||||
if (uk.IsUnique) sb.Append("UNIQUE ");
|
||||
sb.Append("INDEX ");
|
||||
if (isPg95) sb.Append("IF NOT EXISTS ");
|
||||
sb.Append(_commonUtils.QuoteSqlName(ReplaceIndexName(uk.Name, tbname[1]))).Append(" ON ").Append(tablename).Append("(");
|
||||
sb.Append(_commonUtils.QuoteSqlName(ReplaceIndexName(uk.Name, tbname[1]))).Append(" ON ").Append(newtablename).Append("(");
|
||||
foreach (var tbcol in uk.Columns)
|
||||
{
|
||||
sb.Append(_commonUtils.QuoteSqlName(tbcol.Column.Attribute.Name));
|
||||
@@ -464,7 +465,7 @@ where pg_namespace.nspname={0} and pg_class.relname={1} and pg_constraint.contyp
|
||||
{
|
||||
if (tbcol.Attribute.IsIdentity)
|
||||
{
|
||||
var maxval = _orm.Ado.QuerySingle<int>($"select max({_commonUtils.QuoteSqlName(tbcol.Attribute.Name)}) from {tablename}");
|
||||
var maxval = _orm.Ado.QuerySingle<int>($"select max({_commonUtils.QuoteSqlName(tbcol.Attribute.Name)}) from {newtablename}");
|
||||
if (maxval > 0)
|
||||
{
|
||||
sb.Append("ALTER TABLE ").Append(_commonUtils.QuoteSqlName($"{tbname[0]}.{tbname[1]}")).Append(" ALTER COLUMN ").Append(_commonUtils.QuoteSqlName(tbcol.Attribute.Name)).Append(" SET GENERATED BY DEFAULT");
|
||||
|
||||
@@ -63,7 +63,7 @@ namespace FreeSql.Odbc.SqlServer
|
||||
if (_skip > 0) // 注意这个判断,大于 0 才使用 ROW_NUMBER ,否则属于第一页直接使用 TOP
|
||||
rownum = $", ROW_NUMBER() OVER({_orderby.Trim('\r', '\n', ' ')}) AS __rownum__";
|
||||
}
|
||||
var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From).ToArray();
|
||||
var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent).ToArray();
|
||||
var tbsfrom = _tables.Where(a => a.Type == SelectTableInfoType.From).ToArray();
|
||||
if (string.IsNullOrEmpty(rownum) == false && field == "*")
|
||||
sb.Append(tbsfrom[0].Alias).Append("."); //#1519 bug
|
||||
@@ -191,7 +191,7 @@ namespace FreeSql.Odbc.SqlServer
|
||||
if (_skip <= 0 && _limit > 0) sb.Append("TOP ").Append(_limit).Append(" ");
|
||||
sb.Append(field);
|
||||
sb.Append(" \r\nFROM ");
|
||||
var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From).ToArray();
|
||||
var tbsjoin = _tables.Where(a => a.Type != SelectTableInfoType.From && a.Type != SelectTableInfoType.Parent).ToArray();
|
||||
var tbsfrom = _tables.Where(a => a.Type == SelectTableInfoType.From).ToArray();
|
||||
for (var a = 0; a < tbsfrom.Length; a++)
|
||||
{
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user