Skip to content

Commit 9fe6460

Browse files
committed
Merge branch 'release/9.3.0'
2 parents e0269f6 + 9851a5b commit 9fe6460

48 files changed

Lines changed: 3272 additions & 2639 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.config/dotnet-tools.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"isRoot": true,
44
"tools": {
55
"gitversion.tool": {
6-
"version": "5.12.0",
6+
"version": "6.0.2",
77
"commands": [
88
"dotnet-gitversion"
99
]

Changelog.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# NEventStore.Persistence.Sql
22

3+
## 9.3.0
4+
5+
- Added a dedicated `ISerializeEvents` interface that allows customizing event deserialization with access to metadata from the `ICommit` class. [#47](https://github.com/NEventStore/NEventStore.Persistence.SQL/issues/47), [#49](https://github.com/NEventStore/NEventStore.Persistence.SQL/issues/49), [#506](https://github.com/NEventStore/NEventStore/issues/506)
6+
- Improved some Comments and Documentation.
7+
- Updated Microsoft.Data.SqlClient to version 5.2.2
8+
- Updated nuget package to include symbols and new icon.
9+
10+
Thanks to: [@chrischu](https://github.com/chrischu)
11+
312
## 9.2.0
413

514
- Using Microsoft.Data.SqlClient instead of System.Data.SqlClient [#40](https://github.com/NEventStore/NEventStore.Persistence.SQL/issues/40)

appveyor.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: 1.0.{build}
22
image: Visual Studio 2022
33
configuration: Release
44
init:
5-
- cmd: ''
5+
- ps: Start-Service MySQL80, postgresql-x64-15
66
assembly_info:
77
patch: true
88
file: '**\AssemblyInfo.*'
@@ -19,13 +19,12 @@ dotnet_csproj:
1919
file_version: '{version}'
2020
informational_version: '{version}'
2121
environment:
22-
NEventStore.MsSql: Server=localhost\SQL2017;Database=NEventStore;User Id=sa;Password=Password12!;
22+
NEventStore.MsSql: Server=localhost\SQL2017;Database=NEventStore;User Id=sa;Password=Password12!;TrustServerCertificate=True;
2323
NEventStore.MySql: Server=localhost;Database=NEventStore;Uid=root;Pwd=Password12!;AutoEnlist=false;
2424
NEventStore.PostgreSql: Server=localhost;Database=NEventStore;Uid=postgres;Pwd=Password12!;Enlist=false;
25+
IGNORE_NORMALISATION_GIT_HEAD_MOVE: 1
2526
services:
2627
- mssql2017
27-
- mysql
28-
- postgresql
2928
install:
3029
- cmd: >-
3130
choco install gitversion.portable -pre -y
@@ -49,13 +48,13 @@ build:
4948
verbosity: minimal
5049
after_build:
5150
- cmd: >-
52-
REM dotnet pack ./src/NEventStore.Persistence.Sql/NEventStore.Persistence.Sql.Core.csproj -c %CONFIGURATION% --no-build -o artifacts -p:PackageVersion=%GitVersion_NuGetVersion%
51+
REM dotnet pack ./src/NEventStore.Persistence.Sql/NEventStore.Persistence.Sql.Core.csproj -c %CONFIGURATION% --no-build -o artifacts -p:PackageVersion=%GitVersion_SemVer%
5352
5453
5554
REM use .nuspec file, projects with submodule generate wrong PackageReferences
5655
5756
58-
nuget pack ./src/.nuget/NEventStore.Persistence.Sql.nuspec -properties "version=%GitVersion_NuGetVersion%;configuration=%CONFIGURATION%" -OutputDirectory artifacts
57+
nuget pack ./src/.nuget/NEventStore.Persistence.Sql.nuspec -properties "version=%GitVersion_SemVer%;configuration=%CONFIGURATION%" -OutputDirectory artifacts
5958
test_script:
6059
- ps: >-
6160
$dbName = "NEventStore"
@@ -72,7 +71,7 @@ test_script:
7271
7372
$env:MYSQL_PWD="Password12!"
7473
75-
$mysqlcmd = '"C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql" -e "create database $dbName;" --user=root'
74+
$mysqlcmd = '"C:\Program Files\MySQL\MySQL Server 8.0\bin\mysql" -e "create database $dbName;" --user=root'
7675
7776
iex "& $mysqlcmd"
7877
@@ -83,7 +82,7 @@ test_script:
8382
8483
$env:PGPASSWORD="Password12!"
8584
86-
$pgcmd = '"C:\Program Files\PostgreSQL\9.6\bin\createdb" $dbName'
85+
$pgcmd = '"C:\Program Files\PostgreSQL\15\bin\createdb" $dbName'
8786
8887
iex "& $pgcmd"
8988

build.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ dotnet restore ./src/NEventStore.Persistence.Sql.Core.sln --verbosity m
1717
Write-Host "Running GitVersion for the Project"
1818
$str = dotnet tool run dotnet-gitversion /updateAssemblyInfo | out-string
1919
$json = convertFrom-json $str
20-
$nugetversion = $json.NuGetVersion
20+
$nugetversion = $json.SemVer
2121

2222
# Now we need to patch the AssemblyInfo for submodules
2323
Write-Host "Running GitVersion for the Dependencies"

icon.png

5.73 KB
Loading

src/.nuget/NEventStore.Persistence.Sql.nuspec

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,28 @@
1212
<summary>Sql persistence provider for NEventStore.</summary>
1313
<language>es-US</language>
1414
<tags>events, event sourcing, cqrs, storage, persistence, database, sql</tags>
15-
<readme>docs\README.md</readme>
16-
<license type="file">LICENSE.txt</license>
15+
<readme>docs\README.md</readme>
16+
<license type="file">LICENSE.txt</license>
17+
<icon>icon.png</icon>
18+
<repository type="git" url="https://github.com/NEventStore/NEventStore.Persistence.SQL.git" />
19+
<copyright>Copyright (c) 2014 NEventStore</copyright>
1720
<!--
1821
Until this is on develop branch, this version should be the previous version, so it made it compatible
19-
with pre-release of the actual version. Ex, if we are on 6.0.0 unstable, dependency from NEventStore should
20-
be latest stable version so it can take prerelease of 6.0.0 version.
21-
With (5.4 we are telling NuGet that we need a version greater than 5.4 so we are allowing all the prerelease
22-
6.x.x versions
23-
-->
22+
with pre-release of the actual version. Ex, if we are on 6.0.0 unstable, dependency from NEventStore should
23+
be latest stable version so it can take prerelease of 6.0.0 version.
24+
With (5.4 we are telling NuGet that we need a version greater than 5.4 so we are allowing all the prerelease
25+
6.x.x versions
26+
-->
2427
<dependencies>
2528
<group targetFramework=".NETFramework4.6.2">
2629
<dependency id="NEventStore" version="[9.1.1,10.0.0)" exclude="Build,Analyzers"/>
2730
<dependency id="Microsoft.Extensions.Logging.Abstractions" version="7.0.1" exclude="Build,Analyzers" />
28-
<dependency id="Microsoft.Data.SqlClient" version="5.2.0" exclude="Build,Analyzers" />
31+
<dependency id="Microsoft.Data.SqlClient" version="5.2.2" exclude="Build,Analyzers" />
2932
</group>
3033
<group targetFramework=".NETStandard2.0">
3134
<dependency id="NEventStore" version="[9.1.1,10.0.0)" exclude="Build,Analyzers"/>
3235
<dependency id="Microsoft.Extensions.Logging.Abstractions" version="7.0.1" exclude="Build,Analyzers" />
33-
<dependency id="Microsoft.Data.SqlClient" version="5.2.0" exclude="Build,Analyzers" />
36+
<dependency id="Microsoft.Data.SqlClient" version="5.2.2" exclude="Build,Analyzers" />
3437
</group>
3538
</dependencies>
3639
<frameworkAssemblies>
@@ -43,7 +46,8 @@
4346
<!--<file src="bin\$configuration$\**" target="lib"/>-->
4447
<file src="..\NEventStore.Persistence.Sql\bin\$configuration$\**\NEventStore.Persistence.Sql.dll" target="lib"/>
4548
<file src="..\NEventStore.Persistence.Sql\bin\$configuration$\**\NEventStore.Persistence.Sql.xml" target="lib"/>
46-
<file src="..\..\README.md" target="docs\" />
47-
<file src="..\..\LICENSE.txt" target="" />
49+
<file src="..\..\README.md" target="docs\" />
50+
<file src="..\..\LICENSE.txt" target="" />
51+
<file src="..\..\icon.png" target="" />
4852
</files>
4953
</package>

src/NEventStore.Persistence.MsSql.Tests/NEventStore.Persistence.MsSql.Core.Tests.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@
1414
</PropertyGroup>
1515

1616
<ItemGroup>
17-
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.2.0" />
17+
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.2.2" />
1818
</ItemGroup>
1919
<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
2020
<Reference Include="System.Transactions" />
2121
</ItemGroup>
2222
<ItemGroup>
23-
<PackageReference Include="FluentAssertions" Version="6.11.0" />
24-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
23+
<PackageReference Include="FluentAssertions" Version="6.12.2" />
24+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
2525
<PackageReference Include="NUnit" Version="3.13.3" />
26-
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
26+
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0" />
2727
</ItemGroup>
2828

2929
<ItemGroup>

src/NEventStore.Persistence.MsSql.Tests/PersistenceEngineFixture.cs

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using NEventStore.Persistence.Sql.Tests;
1+
using Microsoft.Data.SqlClient;
2+
using NEventStore.Persistence.Sql.Tests;
23

34
namespace NEventStore.Persistence.AcceptanceTests
45
{
@@ -13,17 +14,23 @@ public partial class PersistenceEngineFixture
1314
/// this mimic the current NEventStore default values which is run outside any transaction (creates a scope that
1415
/// suppresses any transaction)
1516
/// </summary>
16-
public TransactionScopeOption? ScopeOption { get; set; } = null; // the old default: TransactionScopeOption.Suppress;
17+
public TransactionScopeOption? ScopeOption { get; set; } =
18+
null; // the old default: TransactionScopeOption.Suppress;
1719

1820
public PersistenceEngineFixture()
1921
{
2022
_createPersistence = pageSize =>
21-
new SqlPersistenceFactory(new EnviromentConnectionFactory("MsSql", Microsoft.Data.SqlClient.SqlClientFactory.Instance),
22-
new BinarySerializer(),
23+
{
24+
var serializer = new BinarySerializer();
25+
return new SqlPersistenceFactory(
26+
new EnviromentConnectionFactory("MsSql", SqlClientFactory.Instance),
27+
serializer,
28+
new DefaultEventSerializer(serializer),
2329
new MsSqlDialect(),
2430
pageSize: pageSize,
2531
scopeOption: ScopeOption
26-
).Build();
32+
).Build();
33+
};
2734
}
2835
}
2936
}

src/NEventStore.Persistence.MsSql.Tests/TransactionIsolationLevelTests.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,13 @@ public IsolationLevelPersistenceEngineFixture()
124124
_recorder = new IsolationLevelRecorder();
125125
_connectionFactory = new EnviromentConnectionFactory("MsSql", Microsoft.Data.SqlClient.SqlClientFactory.Instance);
126126
_createPersistence = () =>
127-
new SqlPersistenceFactory(_connectionFactory,
128-
new BinarySerializer(),
127+
{
128+
var serializer = new BinarySerializer();
129+
return new SqlPersistenceFactory(_connectionFactory,
130+
serializer,
131+
new DefaultEventSerializer(serializer),
129132
new IsolationLevelRecordingSqlDialect(_recorder)).Build();
133+
};
130134
}
131135

132136
public void Initialize()

src/NEventStore.Persistence.MySql.Tests/NEventStore.Persistence.MySql.Core.Tests.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
<Reference Include="System.Transactions" />
2222
</ItemGroup>
2323
<ItemGroup>
24-
<PackageReference Include="FluentAssertions" Version="6.11.0" />
25-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
24+
<PackageReference Include="FluentAssertions" Version="6.12.2" />
25+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
2626
<PackageReference Include="NUnit" Version="3.13.3" />
27-
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
27+
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0" />
2828
</ItemGroup>
2929

3030
<ItemGroup>

0 commit comments

Comments
 (0)