Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update YesSQL 3.4.0 #14491

Merged
merged 2 commits into from
Oct 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/OrchardCore.Build/Dependencies.props
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@
<PackageManagement Include="xunit" Version="2.5.1" />
<PackageManagement Include="xunit.analyzers" Version="1.3.0" />
<PackageManagement Include="xunit.runner.visualstudio" Version="2.5.1" />
<PackageManagement Include="YesSql" Version="3.3.0" />
<PackageManagement Include="YesSql.Abstractions" Version="3.3.0" />
<PackageManagement Include="YesSql.Core" Version="3.3.0" />
<PackageManagement Include="YesSql.Filters.Abstractions" Version="3.3.0" />
<PackageManagement Include="YesSql.Filters.Query" Version="3.3.0" />
<PackageManagement Include="YesSql" Version="3.4.0" />
<PackageManagement Include="YesSql.Abstractions" Version="3.4.0" />
<PackageManagement Include="YesSql.Core" Version="3.4.0" />
<PackageManagement Include="YesSql.Filters.Abstractions" Version="3.4.0" />
<PackageManagement Include="YesSql.Filters.Query" Version="3.4.0" />
<PackageManagement Include="ZString" Version="2.5.1" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion src/docs/resources/libraries/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ The below table lists the different .NET libraries used in Orchard Core:
| [Serilog.AspNetCore](https://github.com/serilog/serilog-aspnetcore) | Serilog integration for ASP.NET Core. | 7.0.0 | [Apache-2.0](https://github.com/serilog/serilog-aspnetcore/blob/dev/LICENSE) |
| [Shortcodes](https://github.com/sebastienros/shortcodes) | Shortcodes processor for .NET. | 1.3.3 | [MIT](https://github.com/sebastienros/shortcodes/blob/dev/LICENSE) |
| [StackExchange.Redis](https://github.com/StackExchange/StackExchange.Redis) | General purpose redis client. | 2.6.122 | [MIT](https://github.com/StackExchange/StackExchange.Redis/blob/main/LICENSE) |
| [YesSql](https://github.com/sebastienros/yessql) | .NET document database working on any RDBMS. | 3.3.0 | [MIT](https://github.com/sebastienros/yessql/blob/dev/LICENSE) |
| [YesSql](https://github.com/sebastienros/yessql) | .NET document database working on any RDBMS. | 3.4.0 | [MIT](https://github.com/sebastienros/yessql/blob/dev/LICENSE) |
| [ZString](https://github.com/Cysharp/ZString) | Zero Allocation StringBuilder for .NET Core and Unity. | 2.5.1 | [MIT](https://github.com/Cysharp/ZString/blob/master/LICENSE) |

The below table lists the different libraries used as Resources:
Expand Down
10 changes: 5 additions & 5 deletions test/OrchardCore.Tests/Orchard.Queries/SqlParserTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ public void ShouldParseWhereClause(string sql, string expectedSql)
[InlineData("select a where a = false", "SELECT [a] WHERE [a] = 0;")]
[InlineData("select a where a = 1", "SELECT [a] WHERE [a] = 1;")]
[InlineData("select a where a = 1.234", "SELECT [a] WHERE [a] = 1.234;")]
[InlineData("select a where a = 'foo'", "SELECT [a] WHERE [a] = 'foo';")]
[InlineData("select a where a like '%foo%'", "SELECT [a] WHERE [a] LIKE '%foo%';")]
[InlineData("select a where a not like '%foo%'", "SELECT [a] WHERE [a] NOT LIKE '%foo%';")]
[InlineData("select a where a = 'foo'", "SELECT [a] WHERE [a] = N'foo';")]
[InlineData("select a where a like '%foo%'", "SELECT [a] WHERE [a] LIKE N'%foo%';")]
[InlineData("select a where a not like '%foo%'", "SELECT [a] WHERE [a] NOT LIKE N'%foo%';")]
[InlineData("select a where a between b and c", "SELECT [a] WHERE [a] BETWEEN [b] AND [c];")]
[InlineData("select a where a not between b and c", "SELECT [a] WHERE [a] NOT BETWEEN [b] AND [c];")]
[InlineData("select a where a = b or c = d", "SELECT [a] WHERE [a] = [b] OR [c] = [d];")]
Expand Down Expand Up @@ -113,8 +113,8 @@ public void ShouldDefineDefaultParametersValue()
[InlineData("select a from b inner join c on b.b1 = c.c1 left join d on d.a = d.b", "SELECT [a] FROM [tp_b] INNER JOIN [tp_c] ON [tp_b].[b1] = [tp_c].[c1] LEFT JOIN [tp_d] ON [tp_d].[a] = [tp_d].[b];")]
[InlineData("select a from b inner join c on b.b1 = c.c1 and b.b2 = c.c2", "SELECT [a] FROM [tp_b] INNER JOIN [tp_c] ON [tp_b].[b1] = [tp_c].[c1] AND [tp_b].[b2] = [tp_c].[c2];")]
[InlineData("select a from b inner join c on b.b1 = c.c1 and b.b2 = @param", "SELECT [a] FROM [tp_b] INNER JOIN [tp_c] ON [tp_b].[b1] = [tp_c].[c1] AND [tp_b].[b2] = @param;")]
[InlineData("select a from b inner join c on 1 = 1 and @param = 'foo'", "SELECT [a] FROM [tp_b] INNER JOIN [tp_c] ON 1 = 1 AND @param = 'foo';")]
[InlineData("select a from b inner join c on 1 = @param left join d on d.a = @param left join e on e.a = 'foo'", "SELECT [a] FROM [tp_b] INNER JOIN [tp_c] ON 1 = @param LEFT JOIN [tp_d] ON [tp_d].[a] = @param LEFT JOIN [tp_e] ON [tp_e].[a] = 'foo';")]
[InlineData("select a from b inner join c on 1 = 1 and @param = 'foo'", "SELECT [a] FROM [tp_b] INNER JOIN [tp_c] ON 1 = 1 AND @param = N'foo';")]
[InlineData("select a from b inner join c on 1 = @param left join d on d.a = @param left join e on e.a = 'foo'", "SELECT [a] FROM [tp_b] INNER JOIN [tp_c] ON 1 = @param LEFT JOIN [tp_d] ON [tp_d].[a] = @param LEFT JOIN [tp_e] ON [tp_e].[a] = N'foo';")]
public void ShouldParseJoinClause(string sql, string expectedSql)
{
var result = SqlParser.TryParse(sql, _schema, _defaultDialect, _defaultTablePrefix, null, out var rawQuery, out _);
Expand Down