mirror of
				https://github.com/nsnail/FreeSql.git
				synced 2025-11-04 01:05:27 +08:00 
			
		
		
		
	- 移除 IUpdate/IDelete WhereExists 方法;
This commit is contained in:
		@@ -23,7 +23,7 @@
 | 
				
			|||||||
  </ItemGroup>
 | 
					  </ItemGroup>
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
  <ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
 | 
					  <ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
 | 
				
			||||||
    <PackageReference Include="CS-Script.Core" Version="1.1.1" />
 | 
					    <PackageReference Include="CS-Script.Core" Version="1.2.2" />
 | 
				
			||||||
  </ItemGroup>
 | 
					  </ItemGroup>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  <PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
 | 
					  <PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
<Project Sdk="Microsoft.NET.Sdk">
 | 
					<Project Sdk="Microsoft.NET.Sdk">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  <PropertyGroup>
 | 
					  <PropertyGroup>
 | 
				
			||||||
    <TargetFrameworks>netstandard2.0;net45;net40</TargetFrameworks>
 | 
					    <TargetFrameworks>netstandard2.1;netstandard2.0;net45;net40</TargetFrameworks>
 | 
				
			||||||
    <Version>0.11.3</Version>
 | 
					    <Version>0.11.3</Version>
 | 
				
			||||||
    <GeneratePackageOnBuild>true</GeneratePackageOnBuild>
 | 
					    <GeneratePackageOnBuild>true</GeneratePackageOnBuild>
 | 
				
			||||||
    <Authors>YeXiangQin</Authors>
 | 
					    <Authors>YeXiangQin</Authors>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
<Project Sdk="Microsoft.NET.Sdk">
 | 
					<Project Sdk="Microsoft.NET.Sdk">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  <PropertyGroup>
 | 
					  <PropertyGroup>
 | 
				
			||||||
    <TargetFrameworks>netstandard2.0;net45;net40</TargetFrameworks>
 | 
					    <TargetFrameworks>netstandard2.1;netstandard2.0;net45;net40</TargetFrameworks>
 | 
				
			||||||
    <Version>0.11.3</Version>
 | 
					    <Version>0.11.3</Version>
 | 
				
			||||||
    <Authors>YeXiangQin</Authors>
 | 
					    <Authors>YeXiangQin</Authors>
 | 
				
			||||||
    <Description>FreeSql Implementation of General Repository, Support MySql/SqlServer/PostgreSQL/Oracle/Sqlite, and read/write separation、and split table.</Description>
 | 
					    <Description>FreeSql Implementation of General Repository, Support MySql/SqlServer/PostgreSQL/Oracle/Sqlite, and read/write separation、and split table.</Description>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -56,11 +56,6 @@ namespace FreeSql.Tests.MySqlConnector
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            sql = delete.Where(items).ToSql().Replace("\r\n", "");
 | 
					            sql = delete.Where(items).ToSql().Replace("\r\n", "");
 | 
				
			||||||
            Assert.Equal("DELETE FROM `tb_topic` WHERE (`Id` IN (1,2,3,4,5,6,7,8,9,10))", sql);
 | 
					            Assert.Equal("DELETE FROM `tb_topic` WHERE (`Id` IN (1,2,3,4,5,6,7,8,9,10))", sql);
 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        [Fact]
 | 
					 | 
				
			||||||
        public void WhereExists()
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        [Fact]
 | 
					        [Fact]
 | 
				
			||||||
        public void ExecuteAffrows()
 | 
					        public void ExecuteAffrows()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -173,11 +173,6 @@ namespace FreeSql.Tests.MySqlConnector
 | 
				
			|||||||
            sql = g.mysql.Update<TestEnumUpdateTb>().NoneParameter().Where(a => a.id == 0 && a.type == TestEnumUpdateTbType.str1)
 | 
					            sql = g.mysql.Update<TestEnumUpdateTb>().NoneParameter().Where(a => a.id == 0 && a.type == TestEnumUpdateTbType.str1)
 | 
				
			||||||
                .Set(a => a.type, TestEnumUpdateTbType.sum211).ToSql().Replace("\r\n", "");
 | 
					                .Set(a => a.type, TestEnumUpdateTbType.sum211).ToSql().Replace("\r\n", "");
 | 
				
			||||||
            Assert.Equal("UPDATE `TestEnumUpdateTb` SET `type` = 'sum211' WHERE (`id` = 0 AND `type` = 'str1')", sql);
 | 
					            Assert.Equal("UPDATE `TestEnumUpdateTb` SET `type` = 'sum211' WHERE (`id` = 0 AND `type` = 'str1')", sql);
 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        [Fact]
 | 
					 | 
				
			||||||
        public void WhereExists()
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        [Fact]
 | 
					        [Fact]
 | 
				
			||||||
        public void ExecuteAffrows()
 | 
					        public void ExecuteAffrows()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -56,11 +56,6 @@ namespace FreeSql.Tests.Odbc.Default
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            sql = delete.Where(items).ToSql().Replace("\r\n", "");
 | 
					            sql = delete.Where(items).ToSql().Replace("\r\n", "");
 | 
				
			||||||
            Assert.Equal("DELETE FROM [tb_topic22211] WHERE ([Id] IN (1,2,3,4,5,6,7,8,9,10))", sql);
 | 
					            Assert.Equal("DELETE FROM [tb_topic22211] WHERE ([Id] IN (1,2,3,4,5,6,7,8,9,10))", sql);
 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        [Fact]
 | 
					 | 
				
			||||||
        public void WhereExists()
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        [Fact]
 | 
					        [Fact]
 | 
				
			||||||
        public void ExecuteAffrows()
 | 
					        public void ExecuteAffrows()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -114,11 +114,6 @@ namespace FreeSql.Tests.Odbc.Default
 | 
				
			|||||||
            for (var a = 0; a < 10; a++) items.Add(new Topic { Id = a + 1, Title = $"newtitle{a}", Clicks = a * 100 });
 | 
					            for (var a = 0; a < 10; a++) items.Add(new Topic { Id = a + 1, Title = $"newtitle{a}", Clicks = a * 100 });
 | 
				
			||||||
            sql = update.Where(items).SetRaw("title='newtitle'").ToSql().Replace("\r\n", "");
 | 
					            sql = update.Where(items).SetRaw("title='newtitle'").ToSql().Replace("\r\n", "");
 | 
				
			||||||
            Assert.Equal("UPDATE [tb_topic] SET title='newtitle' WHERE ([Id] IN (1,2,3,4,5,6,7,8,9,10))", sql);
 | 
					            Assert.Equal("UPDATE [tb_topic] SET title='newtitle' WHERE ([Id] IN (1,2,3,4,5,6,7,8,9,10))", sql);
 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        [Fact]
 | 
					 | 
				
			||||||
        public void WhereExists()
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        [Fact]
 | 
					        [Fact]
 | 
				
			||||||
        public void ExecuteAffrows()
 | 
					        public void ExecuteAffrows()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -56,11 +56,6 @@ namespace FreeSql.Tests.Odbc.MySql
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            sql = delete.Where(items).ToSql().Replace("\r\n", "");
 | 
					            sql = delete.Where(items).ToSql().Replace("\r\n", "");
 | 
				
			||||||
            Assert.Equal("DELETE FROM `tb_topic` WHERE (`Id` IN (1,2,3,4,5,6,7,8,9,10))", sql);
 | 
					            Assert.Equal("DELETE FROM `tb_topic` WHERE (`Id` IN (1,2,3,4,5,6,7,8,9,10))", sql);
 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        [Fact]
 | 
					 | 
				
			||||||
        public void WhereExists()
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        [Fact]
 | 
					        [Fact]
 | 
				
			||||||
        public void ExecuteAffrows()
 | 
					        public void ExecuteAffrows()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -173,11 +173,6 @@ namespace FreeSql.Tests.Odbc.MySql
 | 
				
			|||||||
            sql = g.mysql.Update<TestEnumUpdateTb>().NoneParameter().Where(a => a.id == 0 && a.type == TestEnumUpdateTbType.str1)
 | 
					            sql = g.mysql.Update<TestEnumUpdateTb>().NoneParameter().Where(a => a.id == 0 && a.type == TestEnumUpdateTbType.str1)
 | 
				
			||||||
                .Set(a => a.type, TestEnumUpdateTbType.sum211).ToSql().Replace("\r\n", "");
 | 
					                .Set(a => a.type, TestEnumUpdateTbType.sum211).ToSql().Replace("\r\n", "");
 | 
				
			||||||
            Assert.Equal("UPDATE `TestEnumUpdateTb` SET `type` = 'sum211' WHERE (`id` = 0 AND `type` = 'str1')", sql);
 | 
					            Assert.Equal("UPDATE `TestEnumUpdateTb` SET `type` = 'sum211' WHERE (`id` = 0 AND `type` = 'str1')", sql);
 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        [Fact]
 | 
					 | 
				
			||||||
        public void WhereExists()
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        [Fact]
 | 
					        [Fact]
 | 
				
			||||||
        public void ExecuteAffrows()
 | 
					        public void ExecuteAffrows()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -57,11 +57,6 @@ namespace FreeSql.Tests.Odbc.Oracle
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            sql = delete.Where(items).ToSql().Replace("\r\n", "");
 | 
					            sql = delete.Where(items).ToSql().Replace("\r\n", "");
 | 
				
			||||||
            Assert.Equal("DELETE FROM \"TB_TOPIC22211\" WHERE (\"ID\" IN (1,2,3,4,5,6,7,8,9,10))", sql);
 | 
					            Assert.Equal("DELETE FROM \"TB_TOPIC22211\" WHERE (\"ID\" IN (1,2,3,4,5,6,7,8,9,10))", sql);
 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        [Fact]
 | 
					 | 
				
			||||||
        public void WhereExists()
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        [Fact]
 | 
					        [Fact]
 | 
				
			||||||
        public void ExecuteAffrows()
 | 
					        public void ExecuteAffrows()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -112,11 +112,6 @@ namespace FreeSql.Tests.Odbc.Oracle
 | 
				
			|||||||
            for (var a = 0; a < 10; a++) items.Add(new Topic { Id = a + 1, Title = $"newtitle{a}", Clicks = a * 100 });
 | 
					            for (var a = 0; a < 10; a++) items.Add(new Topic { Id = a + 1, Title = $"newtitle{a}", Clicks = a * 100 });
 | 
				
			||||||
            sql = update.Where(items).SetRaw("title='newtitle'").ToSql().Replace("\r\n", "");
 | 
					            sql = update.Where(items).SetRaw("title='newtitle'").ToSql().Replace("\r\n", "");
 | 
				
			||||||
            Assert.Equal("UPDATE \"TB_TOPIC\" SET title='newtitle' WHERE (\"ID\" IN (1,2,3,4,5,6,7,8,9,10))", sql);
 | 
					            Assert.Equal("UPDATE \"TB_TOPIC\" SET title='newtitle' WHERE (\"ID\" IN (1,2,3,4,5,6,7,8,9,10))", sql);
 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        [Fact]
 | 
					 | 
				
			||||||
        public void WhereExists()
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        [Fact]
 | 
					        [Fact]
 | 
				
			||||||
        public void ExecuteAffrows()
 | 
					        public void ExecuteAffrows()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -57,11 +57,6 @@ namespace FreeSql.Tests.Odbc.PostgreSQL
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            sql = delete.Where(items).ToSql().Replace("\r\n", "");
 | 
					            sql = delete.Where(items).ToSql().Replace("\r\n", "");
 | 
				
			||||||
            Assert.Equal("DELETE FROM \"tb_topic_del\" WHERE (\"id\" IN (1,2,3,4,5,6,7,8,9,10))", sql);
 | 
					            Assert.Equal("DELETE FROM \"tb_topic_del\" WHERE (\"id\" IN (1,2,3,4,5,6,7,8,9,10))", sql);
 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        [Fact]
 | 
					 | 
				
			||||||
        public void WhereExists()
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        [Fact]
 | 
					        [Fact]
 | 
				
			||||||
        public void ExecuteAffrows()
 | 
					        public void ExecuteAffrows()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -113,11 +113,6 @@ namespace FreeSql.Tests.Odbc.PostgreSQL
 | 
				
			|||||||
            for (var a = 0; a < 10; a++) items.Add(new Topic { Id = a + 1, Title = $"newtitle{a}", Clicks = a * 100 });
 | 
					            for (var a = 0; a < 10; a++) items.Add(new Topic { Id = a + 1, Title = $"newtitle{a}", Clicks = a * 100 });
 | 
				
			||||||
            sql = update.Where(items).SetRaw("title='newtitle'").ToSql().Replace("\r\n", "");
 | 
					            sql = update.Where(items).SetRaw("title='newtitle'").ToSql().Replace("\r\n", "");
 | 
				
			||||||
            Assert.Equal("UPDATE \"tb_topic\" SET title='newtitle' WHERE (\"id\" IN (1,2,3,4,5,6,7,8,9,10))", sql);
 | 
					            Assert.Equal("UPDATE \"tb_topic\" SET title='newtitle' WHERE (\"id\" IN (1,2,3,4,5,6,7,8,9,10))", sql);
 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        [Fact]
 | 
					 | 
				
			||||||
        public void WhereExists()
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        [Fact]
 | 
					        [Fact]
 | 
				
			||||||
        public void ExecuteAffrows()
 | 
					        public void ExecuteAffrows()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -57,11 +57,6 @@ namespace FreeSql.Tests.Odbc.SqlServer
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            sql = delete.Where(items).ToSql().Replace("\r\n", "");
 | 
					            sql = delete.Where(items).ToSql().Replace("\r\n", "");
 | 
				
			||||||
            Assert.Equal("DELETE FROM [tb_topic22211] WHERE ([Id] IN (1,2,3,4,5,6,7,8,9,10))", sql);
 | 
					            Assert.Equal("DELETE FROM [tb_topic22211] WHERE ([Id] IN (1,2,3,4,5,6,7,8,9,10))", sql);
 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        [Fact]
 | 
					 | 
				
			||||||
        public void WhereExists()
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        [Fact]
 | 
					        [Fact]
 | 
				
			||||||
        public void ExecuteAffrows()
 | 
					        public void ExecuteAffrows()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -115,11 +115,6 @@ namespace FreeSql.Tests.Odbc.SqlServer
 | 
				
			|||||||
            for (var a = 0; a < 10; a++) items.Add(new Topic { Id = a + 1, Title = $"newtitle{a}", Clicks = a * 100 });
 | 
					            for (var a = 0; a < 10; a++) items.Add(new Topic { Id = a + 1, Title = $"newtitle{a}", Clicks = a * 100 });
 | 
				
			||||||
            sql = update.Where(items).SetRaw("title='newtitle'").ToSql().Replace("\r\n", "");
 | 
					            sql = update.Where(items).SetRaw("title='newtitle'").ToSql().Replace("\r\n", "");
 | 
				
			||||||
            Assert.Equal("UPDATE [tb_topic] SET title='newtitle' WHERE ([Id] IN (1,2,3,4,5,6,7,8,9,10))", sql);
 | 
					            Assert.Equal("UPDATE [tb_topic] SET title='newtitle' WHERE ([Id] IN (1,2,3,4,5,6,7,8,9,10))", sql);
 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        [Fact]
 | 
					 | 
				
			||||||
        public void WhereExists()
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        [Fact]
 | 
					        [Fact]
 | 
				
			||||||
        public void ExecuteAffrows()
 | 
					        public void ExecuteAffrows()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -57,11 +57,6 @@ namespace FreeSql.Tests.MySql
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            sql = delete.Where(items).ToSql().Replace("\r\n", "");
 | 
					            sql = delete.Where(items).ToSql().Replace("\r\n", "");
 | 
				
			||||||
            Assert.Equal("DELETE FROM `tb_topic` WHERE (`Id` IN (1,2,3,4,5,6,7,8,9,10))", sql);
 | 
					            Assert.Equal("DELETE FROM `tb_topic` WHERE (`Id` IN (1,2,3,4,5,6,7,8,9,10))", sql);
 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        [Fact]
 | 
					 | 
				
			||||||
        public void WhereExists()
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        [Fact]
 | 
					        [Fact]
 | 
				
			||||||
        public void ExecuteAffrows()
 | 
					        public void ExecuteAffrows()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -174,11 +174,6 @@ namespace FreeSql.Tests.MySql
 | 
				
			|||||||
            sql = g.mysql.Update<TestEnumUpdateTb>().NoneParameter().Where(a => a.id == 0 && a.type == TestEnumUpdateTbType.str1)
 | 
					            sql = g.mysql.Update<TestEnumUpdateTb>().NoneParameter().Where(a => a.id == 0 && a.type == TestEnumUpdateTbType.str1)
 | 
				
			||||||
                .Set(a => a.type, TestEnumUpdateTbType.sum211).ToSql().Replace("\r\n", "");
 | 
					                .Set(a => a.type, TestEnumUpdateTbType.sum211).ToSql().Replace("\r\n", "");
 | 
				
			||||||
            Assert.Equal("UPDATE `TestEnumUpdateTb` SET `type` = 'sum211' WHERE (`id` = 0 AND `type` = 'str1')", sql);
 | 
					            Assert.Equal("UPDATE `TestEnumUpdateTb` SET `type` = 'sum211' WHERE (`id` = 0 AND `type` = 'str1')", sql);
 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        [Fact]
 | 
					 | 
				
			||||||
        public void WhereExists()
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        [Fact]
 | 
					        [Fact]
 | 
				
			||||||
        public void ExecuteAffrows()
 | 
					        public void ExecuteAffrows()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -57,11 +57,6 @@ namespace FreeSql.Tests.Oracle
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            sql = delete.Where(items).ToSql().Replace("\r\n", "");
 | 
					            sql = delete.Where(items).ToSql().Replace("\r\n", "");
 | 
				
			||||||
            Assert.Equal("DELETE FROM \"TB_TOPIC22211\" WHERE (\"ID\" IN (1,2,3,4,5,6,7,8,9,10))", sql);
 | 
					            Assert.Equal("DELETE FROM \"TB_TOPIC22211\" WHERE (\"ID\" IN (1,2,3,4,5,6,7,8,9,10))", sql);
 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        [Fact]
 | 
					 | 
				
			||||||
        public void WhereExists()
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        [Fact]
 | 
					        [Fact]
 | 
				
			||||||
        public void ExecuteAffrows()
 | 
					        public void ExecuteAffrows()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -112,11 +112,6 @@ namespace FreeSql.Tests.Oracle
 | 
				
			|||||||
            for (var a = 0; a < 10; a++) items.Add(new Topic { Id = a + 1, Title = $"newtitle{a}", Clicks = a * 100 });
 | 
					            for (var a = 0; a < 10; a++) items.Add(new Topic { Id = a + 1, Title = $"newtitle{a}", Clicks = a * 100 });
 | 
				
			||||||
            sql = update.Where(items).SetRaw("title='newtitle'").ToSql().Replace("\r\n", "");
 | 
					            sql = update.Where(items).SetRaw("title='newtitle'").ToSql().Replace("\r\n", "");
 | 
				
			||||||
            Assert.Equal("UPDATE \"TB_TOPIC\" SET title='newtitle' WHERE (\"ID\" IN (1,2,3,4,5,6,7,8,9,10))", sql);
 | 
					            Assert.Equal("UPDATE \"TB_TOPIC\" SET title='newtitle' WHERE (\"ID\" IN (1,2,3,4,5,6,7,8,9,10))", sql);
 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        [Fact]
 | 
					 | 
				
			||||||
        public void WhereExists()
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        [Fact]
 | 
					        [Fact]
 | 
				
			||||||
        public void ExecuteAffrows()
 | 
					        public void ExecuteAffrows()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -57,11 +57,6 @@ namespace FreeSql.Tests.PostgreSQL
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            sql = delete.Where(items).ToSql().Replace("\r\n", "");
 | 
					            sql = delete.Where(items).ToSql().Replace("\r\n", "");
 | 
				
			||||||
            Assert.Equal("DELETE FROM \"tb_topic_del\" WHERE (\"id\" IN (1,2,3,4,5,6,7,8,9,10))", sql);
 | 
					            Assert.Equal("DELETE FROM \"tb_topic_del\" WHERE (\"id\" IN (1,2,3,4,5,6,7,8,9,10))", sql);
 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        [Fact]
 | 
					 | 
				
			||||||
        public void WhereExists()
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        [Fact]
 | 
					        [Fact]
 | 
				
			||||||
        public void ExecuteAffrows()
 | 
					        public void ExecuteAffrows()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -113,11 +113,6 @@ namespace FreeSql.Tests.PostgreSQL
 | 
				
			|||||||
            for (var a = 0; a < 10; a++) items.Add(new Topic { Id = a + 1, Title = $"newtitle{a}", Clicks = a * 100 });
 | 
					            for (var a = 0; a < 10; a++) items.Add(new Topic { Id = a + 1, Title = $"newtitle{a}", Clicks = a * 100 });
 | 
				
			||||||
            sql = update.Where(items).SetRaw("title='newtitle'").ToSql().Replace("\r\n", "");
 | 
					            sql = update.Where(items).SetRaw("title='newtitle'").ToSql().Replace("\r\n", "");
 | 
				
			||||||
            Assert.Equal("UPDATE \"tb_topic\" SET title='newtitle' WHERE (\"id\" IN (1,2,3,4,5,6,7,8,9,10))", sql);
 | 
					            Assert.Equal("UPDATE \"tb_topic\" SET title='newtitle' WHERE (\"id\" IN (1,2,3,4,5,6,7,8,9,10))", sql);
 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        [Fact]
 | 
					 | 
				
			||||||
        public void WhereExists()
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        [Fact]
 | 
					        [Fact]
 | 
				
			||||||
        public void ExecuteAffrows()
 | 
					        public void ExecuteAffrows()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -65,11 +65,6 @@ namespace FreeSql.Tests.SqlServer
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            sql = delete.Where(items).ToSql().Replace("\r\n", "");
 | 
					            sql = delete.Where(items).ToSql().Replace("\r\n", "");
 | 
				
			||||||
            Assert.Equal("DELETE FROM [tb_topic22211] WHERE ([Id] IN (1,2,3,4,5,6,7,8,9,10))", sql);
 | 
					            Assert.Equal("DELETE FROM [tb_topic22211] WHERE ([Id] IN (1,2,3,4,5,6,7,8,9,10))", sql);
 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        [Fact]
 | 
					 | 
				
			||||||
        public void WhereExists()
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        [Fact]
 | 
					        [Fact]
 | 
				
			||||||
        public void ExecuteAffrows()
 | 
					        public void ExecuteAffrows()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -124,11 +124,6 @@ namespace FreeSql.Tests.SqlServer
 | 
				
			|||||||
            for (var a = 0; a < 10; a++) items.Add(new Topic { Id = a + 1, Title = $"newtitle{a}", Clicks = a * 100 });
 | 
					            for (var a = 0; a < 10; a++) items.Add(new Topic { Id = a + 1, Title = $"newtitle{a}", Clicks = a * 100 });
 | 
				
			||||||
            sql = update.Where(items).SetRaw("title='newtitle'").ToSql().Replace("\r\n", "");
 | 
					            sql = update.Where(items).SetRaw("title='newtitle'").ToSql().Replace("\r\n", "");
 | 
				
			||||||
            Assert.Equal("UPDATE [tb_topic] SET title='newtitle' WHERE ([Id] IN (1,2,3,4,5,6,7,8,9,10))", sql);
 | 
					            Assert.Equal("UPDATE [tb_topic] SET title='newtitle' WHERE ([Id] IN (1,2,3,4,5,6,7,8,9,10))", sql);
 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        [Fact]
 | 
					 | 
				
			||||||
        public void WhereExists()
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        [Fact]
 | 
					        [Fact]
 | 
				
			||||||
        public void ExecuteAffrows()
 | 
					        public void ExecuteAffrows()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -57,11 +57,6 @@ namespace FreeSql.Tests.Sqlite
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            sql = delete.Where(items).ToSql().Replace("\r\n", "");
 | 
					            sql = delete.Where(items).ToSql().Replace("\r\n", "");
 | 
				
			||||||
            Assert.Equal("DELETE FROM \"tb_topic22211\" WHERE (\"Id\" IN (1,2,3,4,5,6,7,8,9,10))", sql);
 | 
					            Assert.Equal("DELETE FROM \"tb_topic22211\" WHERE (\"Id\" IN (1,2,3,4,5,6,7,8,9,10))", sql);
 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        [Fact]
 | 
					 | 
				
			||||||
        public void WhereExists()
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        [Fact]
 | 
					        [Fact]
 | 
				
			||||||
        public void ExecuteAffrows()
 | 
					        public void ExecuteAffrows()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -117,11 +117,6 @@ namespace FreeSql.Tests.Sqlite
 | 
				
			|||||||
            for (var a = 0; a < 10; a++) items.Add(new Topic { Id = a + 1, Title = $"newtitle{a}", Clicks = a * 100 });
 | 
					            for (var a = 0; a < 10; a++) items.Add(new Topic { Id = a + 1, Title = $"newtitle{a}", Clicks = a * 100 });
 | 
				
			||||||
            sql = update.Where(items).SetRaw("title='newtitle'").ToSql().Replace("\r\n", "");
 | 
					            sql = update.Where(items).SetRaw("title='newtitle'").ToSql().Replace("\r\n", "");
 | 
				
			||||||
            Assert.Equal("UPDATE \"tb_topic\" SET title='newtitle' WHERE (\"Id\" IN (1,2,3,4,5,6,7,8,9,10))", sql);
 | 
					            Assert.Equal("UPDATE \"tb_topic\" SET title='newtitle' WHERE (\"Id\" IN (1,2,3,4,5,6,7,8,9,10))", sql);
 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        [Fact]
 | 
					 | 
				
			||||||
        public void WhereExists()
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        [Fact]
 | 
					        [Fact]
 | 
				
			||||||
        public void ExecuteAffrows()
 | 
					        public void ExecuteAffrows()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -638,15 +638,6 @@
 | 
				
			|||||||
            <param name="items">实体集合</param>
 | 
					            <param name="items">实体集合</param>
 | 
				
			||||||
            <returns></returns>
 | 
					            <returns></returns>
 | 
				
			||||||
        </member>
 | 
					        </member>
 | 
				
			||||||
        <member name="M:FreeSql.IDelete`1.WhereExists``1(FreeSql.ISelect{``0},System.Boolean)">
 | 
					 | 
				
			||||||
            <summary>
 | 
					 | 
				
			||||||
            子查询是否存在
 | 
					 | 
				
			||||||
            </summary>
 | 
					 | 
				
			||||||
            <typeparam name="TEntity2"></typeparam>
 | 
					 | 
				
			||||||
            <param name="select">子查询</param>
 | 
					 | 
				
			||||||
            <param name="notExists">不存在</param>
 | 
					 | 
				
			||||||
            <returns></returns>
 | 
					 | 
				
			||||||
        </member>
 | 
					 | 
				
			||||||
        <member name="M:FreeSql.IDelete`1.WhereDynamic(System.Object)">
 | 
					        <member name="M:FreeSql.IDelete`1.WhereDynamic(System.Object)">
 | 
				
			||||||
            <summary>
 | 
					            <summary>
 | 
				
			||||||
            传入动态对象如:主键值 | new[]{主键值1,主键值2} | TEntity1 | new[]{TEntity1,TEntity2} | new{id=1}
 | 
					            传入动态对象如:主键值 | new[]{主键值1,主键值2} | TEntity1 | new[]{TEntity1,TEntity2} | new{id=1}
 | 
				
			||||||
@@ -1746,15 +1737,6 @@
 | 
				
			|||||||
            <param name="items">实体集合</param>
 | 
					            <param name="items">实体集合</param>
 | 
				
			||||||
            <returns></returns>
 | 
					            <returns></returns>
 | 
				
			||||||
        </member>
 | 
					        </member>
 | 
				
			||||||
        <member name="M:FreeSql.IUpdate`1.WhereExists``1(FreeSql.ISelect{``0},System.Boolean)">
 | 
					 | 
				
			||||||
            <summary>
 | 
					 | 
				
			||||||
            子查询是否存在
 | 
					 | 
				
			||||||
            </summary>
 | 
					 | 
				
			||||||
            <typeparam name="TEntity2"></typeparam>
 | 
					 | 
				
			||||||
            <param name="select">子查询</param>
 | 
					 | 
				
			||||||
            <param name="notExists">不存在</param>
 | 
					 | 
				
			||||||
            <returns></returns>
 | 
					 | 
				
			||||||
        </member>
 | 
					 | 
				
			||||||
        <member name="M:FreeSql.IUpdate`1.WhereDynamic(System.Object)">
 | 
					        <member name="M:FreeSql.IUpdate`1.WhereDynamic(System.Object)">
 | 
				
			||||||
            <summary>
 | 
					            <summary>
 | 
				
			||||||
            传入动态对象如:主键值 | new[]{主键值1,主键值2} | TEntity1 | new[]{TEntity1,TEntity2} | new{id=1}
 | 
					            传入动态对象如:主键值 | new[]{主键值1,主键值2} | TEntity1 | new[]{TEntity1,TEntity2} | new{id=1}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -48,14 +48,6 @@ namespace FreeSql
 | 
				
			|||||||
        /// <returns></returns>
 | 
					        /// <returns></returns>
 | 
				
			||||||
        IDelete<T1> Where(IEnumerable<T1> items);
 | 
					        IDelete<T1> Where(IEnumerable<T1> items);
 | 
				
			||||||
        /// <summary>
 | 
					        /// <summary>
 | 
				
			||||||
        /// 子查询是否存在
 | 
					 | 
				
			||||||
        /// </summary>
 | 
					 | 
				
			||||||
        /// <typeparam name="TEntity2"></typeparam>
 | 
					 | 
				
			||||||
        /// <param name="select">子查询</param>
 | 
					 | 
				
			||||||
        /// <param name="notExists">不存在</param>
 | 
					 | 
				
			||||||
        /// <returns></returns>
 | 
					 | 
				
			||||||
        IDelete<T1> WhereExists<TEntity2>(ISelect<TEntity2> select, bool notExists = false) where TEntity2 : class;
 | 
					 | 
				
			||||||
        /// <summary>
 | 
					 | 
				
			||||||
        /// 传入动态对象如:主键值 | new[]{主键值1,主键值2} | TEntity1 | new[]{TEntity1,TEntity2} | new{id=1}
 | 
					        /// 传入动态对象如:主键值 | new[]{主键值1,主键值2} | TEntity1 | new[]{TEntity1,TEntity2} | new{id=1}
 | 
				
			||||||
        /// </summary>
 | 
					        /// </summary>
 | 
				
			||||||
        /// <param name="dywhere">主键值、主键值集合、实体、实体集合、匿名对象、匿名对象集合</param>
 | 
					        /// <param name="dywhere">主键值、主键值集合、实体、实体集合、匿名对象、匿名对象集合</param>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -117,14 +117,6 @@ namespace FreeSql
 | 
				
			|||||||
        /// <returns></returns>
 | 
					        /// <returns></returns>
 | 
				
			||||||
        IUpdate<T1> Where(IEnumerable<T1> items);
 | 
					        IUpdate<T1> Where(IEnumerable<T1> items);
 | 
				
			||||||
        /// <summary>
 | 
					        /// <summary>
 | 
				
			||||||
        /// 子查询是否存在
 | 
					 | 
				
			||||||
        /// </summary>
 | 
					 | 
				
			||||||
        /// <typeparam name="TEntity2"></typeparam>
 | 
					 | 
				
			||||||
        /// <param name="select">子查询</param>
 | 
					 | 
				
			||||||
        /// <param name="notExists">不存在</param>
 | 
					 | 
				
			||||||
        /// <returns></returns>
 | 
					 | 
				
			||||||
        IUpdate<T1> WhereExists<TEntity2>(ISelect<TEntity2> select, bool notExists = false) where TEntity2 : class;
 | 
					 | 
				
			||||||
        /// <summary>
 | 
					 | 
				
			||||||
        /// 传入动态对象如:主键值 | new[]{主键值1,主键值2} | TEntity1 | new[]{TEntity1,TEntity2} | new{id=1}
 | 
					        /// 传入动态对象如:主键值 | new[]{主键值1,主键值2} | TEntity1 | new[]{TEntity1,TEntity2} | new{id=1}
 | 
				
			||||||
        /// </summary>
 | 
					        /// </summary>
 | 
				
			||||||
        /// <param name="dywhere">主键值、主键值集合、实体、实体集合、匿名对象、匿名对象集合</param>
 | 
					        /// <param name="dywhere">主键值、主键值集合、实体、实体集合、匿名对象、匿名对象集合</param>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -100,7 +100,6 @@ namespace FreeSql.Internal.CommonProvider
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
        public IDelete<T1> Where(T1 item) => this.Where(new[] { item });
 | 
					        public IDelete<T1> Where(T1 item) => this.Where(new[] { item });
 | 
				
			||||||
        public IDelete<T1> Where(IEnumerable<T1> items) => this.Where(_commonUtils.WhereItems(_table, "", items));
 | 
					        public IDelete<T1> Where(IEnumerable<T1> items) => this.Where(_commonUtils.WhereItems(_table, "", items));
 | 
				
			||||||
        public IDelete<T1> WhereExists<TEntity2>(ISelect<TEntity2> select, bool notExists = false) where TEntity2 : class => this.Where($"{(notExists ? "NOT " : "")}EXISTS({select.ToSql("1")})");
 | 
					 | 
				
			||||||
        public IDelete<T1> WhereDynamic(object dywhere) => this.Where(_commonUtils.WhereObject(_table, "", dywhere));
 | 
					        public IDelete<T1> WhereDynamic(object dywhere) => this.Where(_commonUtils.WhereObject(_table, "", dywhere));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        public IDelete<T1> DisableGlobalFilter(params string[] name)
 | 
					        public IDelete<T1> DisableGlobalFilter(params string[] name)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -438,7 +438,6 @@ namespace FreeSql.Internal.CommonProvider
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
        public IUpdate<T1> Where(T1 item) => this.Where(new[] { item });
 | 
					        public IUpdate<T1> Where(T1 item) => this.Where(new[] { item });
 | 
				
			||||||
        public IUpdate<T1> Where(IEnumerable<T1> items) => this.Where(_commonUtils.WhereItems(_table, "", items));
 | 
					        public IUpdate<T1> Where(IEnumerable<T1> items) => this.Where(_commonUtils.WhereItems(_table, "", items));
 | 
				
			||||||
        public IUpdate<T1> WhereExists<TEntity2>(ISelect<TEntity2> select, bool notExists = false) where TEntity2 : class => this.Where($"{(notExists ? "NOT " : "")}EXISTS({select.ToSql("1")})");
 | 
					 | 
				
			||||||
        public IUpdate<T1> WhereDynamic(object dywhere) => this.Where(_commonUtils.WhereObject(_table, "", dywhere));
 | 
					        public IUpdate<T1> WhereDynamic(object dywhere) => this.Where(_commonUtils.WhereObject(_table, "", dywhere));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        public IUpdate<T1> DisableGlobalFilter(params string[] name)
 | 
					        public IUpdate<T1> DisableGlobalFilter(params string[] name)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -23,7 +23,7 @@
 | 
				
			|||||||
  </ItemGroup>
 | 
					  </ItemGroup>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  <ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'net452'">
 | 
					  <ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'net452'">
 | 
				
			||||||
    <PackageReference Include="MySql.Data" Version="8.0.17" />
 | 
					    <PackageReference Include="MySql.Data" Version="8.0.18" />
 | 
				
			||||||
  </ItemGroup>
 | 
					  </ItemGroup>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  <ItemGroup Condition="'$(TargetFramework)' == 'net451' or '$(TargetFramework)' == 'net45' or '$(TargetFramework)' == 'net40'">
 | 
					  <ItemGroup Condition="'$(TargetFramework)' == 'net451' or '$(TargetFramework)' == 'net45' or '$(TargetFramework)' == 'net40'">
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -23,7 +23,7 @@
 | 
				
			|||||||
  </ItemGroup>
 | 
					  </ItemGroup>
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
	<ItemGroup>
 | 
						<ItemGroup>
 | 
				
			||||||
		<PackageReference Include="MySqlConnector" Version="0.59.0" />
 | 
							<PackageReference Include="MySqlConnector" Version="0.60.3" />
 | 
				
			||||||
	</ItemGroup>
 | 
						</ItemGroup>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	<ItemGroup>
 | 
						<ItemGroup>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -23,7 +23,7 @@
 | 
				
			|||||||
  </ItemGroup>
 | 
					  </ItemGroup>
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
	<ItemGroup>
 | 
						<ItemGroup>
 | 
				
			||||||
	  <PackageReference Include="System.Data.SQLite.Core" Version="1.0.111" />
 | 
						  <PackageReference Include="System.Data.SQLite.Core" Version="1.0.112" />
 | 
				
			||||||
	</ItemGroup>
 | 
						</ItemGroup>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	<ItemGroup>
 | 
						<ItemGroup>
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user