Skip to content
Open
Show file tree
Hide file tree
Changes from 3 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
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
<PackageVersion Include="mod_spatialite" Version="4.3.0.1" />
<PackageVersion Include="SQLitePCLRaw.core" Version="$(SQLitePCLRawVersion)" />
<PackageVersion Include="SQLitePCLRaw.bundle_sqlite3" Version="$(SQLitePCLRawVersion)" />
<PackageVersion Include="SQLitePCLRaw.bundle_e_sqlite3" Version="$(SQLitePCLRawVersion)" />
<PackageVersion Include="SQLite3MC.PCLRaw.bundle" Version="$(SQLite3MCPCLRawBundleVersion)" />
</ItemGroup>
</Project>
19 changes: 6 additions & 13 deletions EFCore.sln
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EFCore.Sqlite.Benchmarks",
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EFCore.Benchmarks", "benchmark\EFCore.Benchmarks\EFCore.Benchmarks.csproj", "{2642F4F0-69BE-4C43-94B7-B298FEC87D89}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Data.Sqlite.e_sqlcipher.Tests", "test\Microsoft.Data.Sqlite.Tests\Microsoft.Data.Sqlite.e_sqlcipher.Tests.csproj", "{7B598E0C-B8E2-4F1F-B53C-ED84178E65BE}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Data.Sqlite.e_sqlite3mc.Tests", "test\Microsoft.Data.Sqlite.Tests\Microsoft.Data.Sqlite.e_sqlite3mc.Tests.csproj", "{203F3577-9E24-4714-AD31-F119B26FA8C1}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Data.Sqlite.sqlite3mc.Tests", "test\Microsoft.Data.Sqlite.Tests\Microsoft.Data.Sqlite.sqlite3mc.Tests.csproj", "{478C5B3F-094F-4437-9010-B0886693EBF9}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Data.Sqlite.winsqlite3.Tests", "test\Microsoft.Data.Sqlite.Tests\Microsoft.Data.Sqlite.winsqlite3.Tests.csproj", "{B163761D-FB4A-4C80-BAB9-01905E1351EF}"
EndProject
Expand Down Expand Up @@ -314,14 +312,10 @@ Global
{2642F4F0-69BE-4C43-94B7-B298FEC87D89}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2642F4F0-69BE-4C43-94B7-B298FEC87D89}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2642F4F0-69BE-4C43-94B7-B298FEC87D89}.Release|Any CPU.Build.0 = Release|Any CPU
{7B598E0C-B8E2-4F1F-B53C-ED84178E65BE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7B598E0C-B8E2-4F1F-B53C-ED84178E65BE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7B598E0C-B8E2-4F1F-B53C-ED84178E65BE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7B598E0C-B8E2-4F1F-B53C-ED84178E65BE}.Release|Any CPU.Build.0 = Release|Any CPU
{203F3577-9E24-4714-AD31-F119B26FA8C1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{203F3577-9E24-4714-AD31-F119B26FA8C1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{203F3577-9E24-4714-AD31-F119B26FA8C1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{203F3577-9E24-4714-AD31-F119B26FA8C1}.Release|Any CPU.Build.0 = Release|Any CPU
{478C5B3F-094F-4437-9010-B0886693EBF9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{478C5B3F-094F-4437-9010-B0886693EBF9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{478C5B3F-094F-4437-9010-B0886693EBF9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{478C5B3F-094F-4437-9010-B0886693EBF9}.Release|Any CPU.Build.0 = Release|Any CPU
{B163761D-FB4A-4C80-BAB9-01905E1351EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B163761D-FB4A-4C80-BAB9-01905E1351EF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B163761D-FB4A-4C80-BAB9-01905E1351EF}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down Expand Up @@ -427,8 +421,7 @@ Global
{24D7B6D5-A22A-4734-BB55-F464C112F891} = {293B4F79-3CB9-402A-A74C-B8108C41A7CF}
{5A44F67E-517F-458D-B9C7-12A4DBBAD64A} = {293B4F79-3CB9-402A-A74C-B8108C41A7CF}
{2642F4F0-69BE-4C43-94B7-B298FEC87D89} = {293B4F79-3CB9-402A-A74C-B8108C41A7CF}
{7B598E0C-B8E2-4F1F-B53C-ED84178E65BE} = {258D5057-81B9-40EC-A872-D21E27452749}
{203F3577-9E24-4714-AD31-F119B26FA8C1} = {258D5057-81B9-40EC-A872-D21E27452749}
{478C5B3F-094F-4437-9010-B0886693EBF9} = {258D5057-81B9-40EC-A872-D21E27452749}
{B163761D-FB4A-4C80-BAB9-01905E1351EF} = {258D5057-81B9-40EC-A872-D21E27452749}
{E0FF35C8-8038-4394-9C2A-AF34BE3CC61F} = {258D5057-81B9-40EC-A872-D21E27452749}
{7C0E5443-FE44-4436-8A7D-CE64D1F889BD} = {258D5057-81B9-40EC-A872-D21E27452749}
Expand Down
3 changes: 1 addition & 2 deletions Microsoft.Data.Sqlite.slnf
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
"src\\Microsoft.Data.Sqlite.Core\\Microsoft.Data.Sqlite.Core.csproj",
"src\\Microsoft.Data.Sqlite\\Microsoft.Data.Sqlite.csproj",
"test\\Microsoft.Data.Sqlite.Tests\\Microsoft.Data.Sqlite.Tests.csproj",
"test\\Microsoft.Data.Sqlite.Tests\\Microsoft.Data.Sqlite.e_sqlcipher.Tests.csproj",
"test\\Microsoft.Data.Sqlite.Tests\\Microsoft.Data.Sqlite.e_sqlite3mc.Tests.csproj",
"test\\Microsoft.Data.Sqlite.Tests\\Microsoft.Data.Sqlite.sqlite3.Tests.csproj",
"test\\Microsoft.Data.Sqlite.Tests\\Microsoft.Data.Sqlite.sqlite3mc.Tests.csproj",
"test\\Microsoft.Data.Sqlite.Tests\\Microsoft.Data.Sqlite.winsqlite3.Tests.csproj"
]
}
Expand Down
3 changes: 2 additions & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
<AzureIdentityVersion>1.21.0</AzureIdentityVersion>
<AzureResourceManagerCosmosDBVersion>1.3.2</AzureResourceManagerCosmosDBVersion>
<OpenTelemetryExporterInMemoryVersion>1.12.0</OpenTelemetryExporterInMemoryVersion>
<SQLitePCLRawVersion>2.1.11</SQLitePCLRawVersion>
<SQLitePCLRawVersion>3.0.3</SQLitePCLRawVersion>
<SQLite3MCPCLRawBundleVersion>2.3.5</SQLite3MCPCLRawBundleVersion>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion src/EFCore.Sqlite/EFCore.Sqlite.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="SQLitePCLRaw.bundle_e_sqlite3" />
<PackageReference Include="SQLite3MC.PCLRaw.bundle" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@

using System.Runtime.CompilerServices;

[assembly: InternalsVisibleTo(
"Microsoft.Data.Sqlite.e_sqlcipher.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
[assembly: InternalsVisibleTo(
"Microsoft.Data.Sqlite.e_sqlite3mc.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
[assembly: InternalsVisibleTo(
"Microsoft.Data.Sqlite.sqlite3.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
[assembly: InternalsVisibleTo(
"Microsoft.Data.Sqlite.sqlite3mc.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
[assembly: InternalsVisibleTo(
"Microsoft.Data.Sqlite.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
[assembly: InternalsVisibleTo(
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.Data.Sqlite/Microsoft.Data.Sqlite.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Microsoft.Data.Sqlite.SqliteTransaction</Description>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="SQLitePCLRaw.bundle_e_sqlite3" />
<PackageReference Include="SQLite3MC.PCLRaw.bundle" />
</ItemGroup>

<ItemGroup>
Expand Down
5 changes: 2 additions & 3 deletions test/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@
<PackageVersion Include="Grpc.AspNetCore" Version="2.80.0" />
<PackageVersion Include="NetTopologySuite.IO.GeoJSON" Version="4.0.0" />
<PackageVersion Include="OpenTelemetry.Exporter.InMemory" Version="$(OpenTelemetryExporterInMemoryVersion)" />
<PackageVersion Include="SQLitePCLRaw.bundle_e_sqlcipher" Version="$(SQLitePCLRawVersion)" />
<PackageVersion Include="SQLitePCLRaw.bundle_e_sqlite3mc" Version="$(SQLitePCLRawVersion)" />
<PackageVersion Include="SQLitePCLRaw.bundle_winsqlite3" Version="$(SQLitePCLRawVersion)" />
<PackageVersion Include="SQLitePCLRaw.provider.sqlite3" Version="$(SQLitePCLRawVersion)" />
<PackageVersion Include="SQLitePCLRaw.provider.winsqlite3" Version="$(SQLitePCLRawVersion)" />

<!-- Pinned versions for Component Governance/NuGetAudit - Remove when root dependencies are updated -->
<!--Workaround for IdentityServer4.EntityFramework v4.1.2-->
Expand Down
2 changes: 1 addition & 1 deletion test/EFCore.Design.Tests/EFCore.Design.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyModel" />
<PackageReference Include="SQLitePCLRaw.bundle_e_sqlite3" />
<PackageReference Include="SQLite3MC.PCLRaw.bundle" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -249,14 +249,16 @@ public virtual Task Average_over_nested_subquery(bool async)
=> AssertAverage(
async,
ss => ss.Set<Customer>().OrderBy(c => c.CustomerID).Take(3),
selector: c => (decimal)c.Orders.Average(double (o) => 5 + o.OrderDetails.Average(int (od) => od.ProductID)));
selector: c => (decimal)c.Orders.Average(double (o) => 5 + o.OrderDetails.Average(int (od) => od.ProductID)),
asserter: (e, a) => Assert.Equal(e, a, 10));

[ConditionalTheory, MemberData(nameof(IsAsyncData))]
public virtual Task Average_over_max_subquery(bool async)
=> AssertAverage(
async,
ss => ss.Set<Customer>().OrderBy(c => c.CustomerID).Take(3),
selector: c => (decimal)c.Orders.Average(int (o) => 5 + o.OrderDetails.Max(int (od) => od.ProductID)));
selector: c => (decimal)c.Orders.Average(int (o) => 5 + o.OrderDetails.Max(int (od) => od.ProductID)),
asserter: (e, a) => Assert.Equal(e, a, 10));

[ConditionalTheory, MemberData(nameof(IsAsyncData))]
public virtual Task Average_on_float_column(bool async)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="SQLitePCLRaw.bundle_e_sqlite3" />
<PackageReference Include="SQLite3MC.PCLRaw.bundle" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
<Nullable>enable</Nullable>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == '$(NetFrameworkCurrent)'">
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Microsoft.Data.Sqlite.Core\Microsoft.Data.Sqlite.Core.csproj" />
</ItemGroup>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="SQLitePCLRaw.bundle_sqlite3" />
<PackageReference Include="SQLitePCLRaw.core" />
<PackageReference Include="SQLitePCLRaw.provider.sqlite3" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,20 @@

<PropertyGroup>
<TargetFrameworks>$(DefaultNetCoreTargetFramework);$(NetFrameworkCurrent)</TargetFrameworks>
<DefineConstants>$(DefineConstants);E_SQLCIPHER</DefineConstants>
<DefineConstants>$(DefineConstants);SQLITE3MC</DefineConstants>
<Nullable>enable</Nullable>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == '$(NetFrameworkCurrent)'">
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Microsoft.Data.Sqlite.Core\Microsoft.Data.Sqlite.Core.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="SQLitePCLRaw.bundle_e_sqlcipher" />
<PackageReference Include="SQLite3MC.PCLRaw.bundle" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="SQLitePCLRaw.bundle_winsqlite3" />
<PackageReference Include="SQLitePCLRaw.core" />
<PackageReference Include="SQLitePCLRaw.provider.winsqlite3" />
</ItemGroup>

</Project>
6 changes: 3 additions & 3 deletions test/Microsoft.Data.Sqlite.Tests/SqliteConnectionTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ public void Open_works_when_password()
{
#if E_SQLITE3 || WINSQLITE3
Open_works_when_password_unsupported();
#elif E_SQLCIPHER || E_SQLITE3MC || SQLCIPHER
#elif E_SQLCIPHER || SQLITE3MC || SQLCIPHER
Open_works_when_password_supported();
#elif SQLITE3
Open_works_when_password_might_be_supported();
Expand Down Expand Up @@ -313,7 +313,7 @@ private void Open_works_when_password_might_be_supported()
connection.Open();
}

#if E_SQLCIPHER || E_SQLITE3MC || SQLCIPHER
#if E_SQLCIPHER || SQLITE3MC || SQLCIPHER
[Fact]
public void Open_decrypts_lazily_when_no_password()
{
Expand Down Expand Up @@ -1287,7 +1287,7 @@ public void Open_releases_handle_when_constructor_fails()
var ex = Assert.Throws<InvalidOperationException>(connection.Open);
Assert.Equal(Resources.EncryptionNotSupported(GetNativeLibraryName()), ex.Message);
Assert.Equal(ConnectionState.Closed, connection.State);
#elif E_SQLCIPHER || E_SQLITE3MC || SQLCIPHER
#elif E_SQLCIPHER || SQLITE3MC || SQLCIPHER
var ex = Assert.Throws<SqliteException>(connection.Open);
Assert.Equal(SQLITE_NOTADB, ex.SqliteErrorCode);
Assert.Equal(ConnectionState.Closed, connection.State);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,38 @@
"Microsoft.Data.Sqlite.Tests.TestUtilities.SqliteTestFramework",
#if E_SQLITE3
"Microsoft.Data.Sqlite.Tests")]
#elif E_SQLCIPHER
"Microsoft.Data.Sqlite.e_sqlcipher.Tests")]
#elif E_SQLITE3MC
"Microsoft.Data.Sqlite.e_sqlite3mc.Tests")]
#elif WINSQLITE3
"Microsoft.Data.Sqlite.winsqlite3.Tests")]
#elif SQLITE3
"Microsoft.Data.Sqlite.sqlite3.Tests")]
#elif SQLITE3MC
"Microsoft.Data.Sqlite.sqlite3mc.Tests")]
#else
#error Unexpected native library
#endif

namespace Microsoft.Data.Sqlite.Tests.TestUtilities;

#if WINSQLITE3
public static class Batteries_V2

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dedupe classes here as well

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And update the PR description to use the servicing template

{
public static void Init()
{
SQLitePCL.raw.SetProvider(new SQLitePCL.SQLite3Provider_winsqlite3());
}
}
#endif

#if SQLITE3
public static class Batteries_V2
{
public static void Init()
{
SQLitePCL.raw.SetProvider(new SQLitePCL.SQLite3Provider_sqlite3());
}
}
#endif

internal class SqliteTestFramework : XunitTestFramework
{
protected SqliteTestFramework(IMessageSink diagnosticMessageSink)
Expand Down
Loading