Skip to content

Commit

Permalink
* replace NuGet package linq2db.MySqlConnector with `linq2db.Postgr…
Browse files Browse the repository at this point in the history
…eSQL` @ crawler

* replace NuGet package `Pomelo.EntityFrameworkCore.MySql.NetTopologySuite` with `Npgsql.EntityFrameworkCore.PostgreSQL.NetTopologySuite` @ imagePipeline
* replace NuGet package `Pomelo.EntityFrameworkCore.MySql` with `Npgsql.EntityFrameworkCore.PostgreSQL` @ shared
* update connection string with parameters for Npgsql @ */appsettings.json
@ c#
  • Loading branch information
n0099 committed Apr 29, 2024
1 parent 0fa579f commit e2ed71e
Show file tree
Hide file tree
Showing 8 changed files with 85 additions and 64 deletions.
2 changes: 1 addition & 1 deletion c#/crawler/appsettings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"ConnectionStrings": { // ConnectionStrings.* is able to hot reload
"Main": "Server=localhost;User=;Password=;Database="
"Main": "Host=localhost;Username=;Password=;Database=;Search Path="
},
"DbSettings": { // DbSettings.* is able to hot reload
"LogLevel": "Warning",
Expand Down
34 changes: 18 additions & 16 deletions c#/crawler/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@
"linq2db": "5.4.0"
}
},
"linq2db.MySqlConnector": {
"linq2db.PostgreSQL": {
"type": "Direct",
"requested": "[5.4.1, )",
"resolved": "5.4.1",
"contentHash": "2COG7ZuoEBl5N4pODkaW5pKn27ELfnCYXr0Ei0b2I1PWvKm1HG4IPK4Z2yNf1ZLunGCRLq4xfqGjue8kuAC9jw==",
"contentHash": "UCZrvZJKkBw2I8Q28QCNlj3T0h1ck8wPdgHv+R8c21BJiMasBwuy81IIbC3ntz51lN8AH9o6Te6oePD/p7FkMQ==",
"dependencies": {
"MySqlConnector": "2.2.7",
"Npgsql": "7.0.6",
"linq2db": "5.4.1"
}
},
Expand Down Expand Up @@ -505,14 +505,6 @@
"resolved": "17.9.28",
"contentHash": "hNfIadilgBXbAOmV7LCdPSmLsUILA3QZhR4Wu9VbFDaHjtU3dCFRfJMbk45galt1pfffz4yI5qT9oUJl+F8mNQ=="
},
"MySqlConnector": {
"type": "Transitive",
"resolved": "2.3.5",
"contentHash": "AmEfUPkFl+Ev6jJ8Dhns3CYHBfD12RHzGYWuLt6DfG6/af6YvOMyPz74ZPPjBYQGRJkumD2Z48Kqm8s5DJuhLA==",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "7.0.1"
}
},
"NLog": {
"type": "Transitive",
"resolved": "5.2.8",
Expand All @@ -528,13 +520,23 @@
"NLog": "5.2.8"
}
},
"Pomelo.EntityFrameworkCore.MySql": {
"Npgsql": {
"type": "Transitive",
"resolved": "8.0.2",
"contentHash": "XjnlcxVBLnEMbyEc5cZzgZeDyLvAniACZQ04W1slWN0f4rmfNzl98gEMvHnFH0fMDF06z9MmgGi/Sr7hJ+BVnw==",
"contentHash": "MuJzLoWCaQhQAR3oh66YR0Ir6mxuezncGX3f8wxvAc21g0+9HICktJQlqMoODhxztZKXE5k9GxRxqUAN+vPb4g==",
"dependencies": {
"Microsoft.EntityFrameworkCore.Relational": "[8.0.2, 8.0.999]",
"MySqlConnector": "2.3.5"
"Microsoft.Extensions.Logging.Abstractions": "8.0.0"
}
},
"Npgsql.EntityFrameworkCore.PostgreSQL": {
"type": "Transitive",
"resolved": "8.0.2",
"contentHash": "eoZPynwkZTWFTgnocvXORuCL2yFZtscrUdqVhjxiRULpC7BMg9zhLM5oDZAU5PoX1PgN77hmkKE4a3PQiHqh7Q==",
"dependencies": {
"Microsoft.EntityFrameworkCore": "8.0.2",
"Microsoft.EntityFrameworkCore.Abstractions": "8.0.2",
"Microsoft.EntityFrameworkCore.Relational": "8.0.2",
"Npgsql": "8.0.2"
}
},
"Roslynator.Analyzers": {
Expand Down Expand Up @@ -611,7 +613,7 @@
"Microsoft.Extensions.Hosting": "[8.0.0, )",
"Microsoft.VisualStudio.Threading.Analyzers": "[17.9.28, )",
"NLog.Extensions.Logging": "[5.3.8, )",
"Pomelo.EntityFrameworkCore.MySql": "[8.0.2, )",
"Npgsql.EntityFrameworkCore.PostgreSQL": "[8.0.2, )",
"Roslynator.Analyzers": "[4.12.2, )",
"SharpSource": "[1.24.0, )",
"SonarAnalyzer.CSharp": "[9.24.0.89429, )",
Expand Down
2 changes: 1 addition & 1 deletion c#/crawler/tbm.Crawler.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<PackageReference Include="FlexLabs.EntityFrameworkCore.Upsert" Version="8.0.0" />
<PackageReference Include="Humanizer.Core.zh-Hans" Version="2.14.1" />
<PackageReference Include="linq2db.EntityFrameworkCore" Version="8.1.0" />
<PackageReference Include="linq2db.MySqlConnector" Version="5.4.1" />
<PackageReference Include="linq2db.PostgreSQL" Version="5.4.1" />
<PackageReference Include="LinqKit.Microsoft.EntityFrameworkCore" Version="8.1.5" />
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0" />
<PackageReference Include="NSonic" Version="1.3.3" />
Expand Down
2 changes: 1 addition & 1 deletion c#/imagePipeline/appsettings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"ConnectionStrings": { // ConnectionStrings.* is able to hot reload
"Main": "Server=localhost;User=;Password=;Database="
"Main": "Host=localhost;Username=;Password=;Database=;Search Path="
},
"DbSettings": { // DbSettings.* is able to hot reload
"LogLevel": "Warning",
Expand Down
79 changes: 48 additions & 31 deletions c#/imagePipeline/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@
"Polly.Extensions.Http": "3.0.0"
}
},
"Npgsql.EntityFrameworkCore.PostgreSQL.NetTopologySuite": {
"type": "Direct",
"requested": "[8.0.2, )",
"resolved": "8.0.2",
"contentHash": "NO4EXEsa0iRHUmHGss7U1fpAUKJ0yz9RIG284NZFOfqysm9GgrFM59OKdzjLc1br1EILv78DLL/uj0BD0fcPVw==",
"dependencies": {
"Npgsql.EntityFrameworkCore.PostgreSQL": "8.0.2",
"Npgsql.NetTopologySuite": "8.0.2"
}
},
"OpenCvSharp4": {
"type": "Direct",
"requested": "[4.9.0.20240103, )",
Expand All @@ -47,19 +57,6 @@
"resolved": "4.9.0.20240103",
"contentHash": "PkV3ge6rE//gj0OlG4TRXzmcLVDoKsJx0lYN1ogx9gZhqUPHlzrnWqKk2hAFK+nU8T0chRhrwHL0U2hSMyoCWw=="
},
"Pomelo.EntityFrameworkCore.MySql.NetTopologySuite": {
"type": "Direct",
"requested": "[8.0.2, )",
"resolved": "8.0.2",
"contentHash": "6vAobua5xjI8b5eybHgRtnkoNYS1rlHe9qlmnbgCkdXAkbIaf80aKP3PQSFIghwcfTKBm5PJ6d7fuD91ArEo0A==",
"dependencies": {
"Microsoft.EntityFrameworkCore.Relational": "[8.0.2, 8.0.999]",
"Microsoft.Extensions.DependencyInjection": "8.0.0",
"MySqlConnector": "2.3.5",
"NetTopologySuite": "2.5.0",
"Pomelo.EntityFrameworkCore.MySql": "8.0.2"
}
},
"Sdcb.PaddleInference.runtime.win64.mkl": {
"type": "Direct",
"requested": "[2.5.1, )",
Expand Down Expand Up @@ -543,14 +540,6 @@
"resolved": "17.9.28",
"contentHash": "hNfIadilgBXbAOmV7LCdPSmLsUILA3QZhR4Wu9VbFDaHjtU3dCFRfJMbk45galt1pfffz4yI5qT9oUJl+F8mNQ=="
},
"MySqlConnector": {
"type": "Transitive",
"resolved": "2.3.5",
"contentHash": "AmEfUPkFl+Ev6jJ8Dhns3CYHBfD12RHzGYWuLt6DfG6/af6YvOMyPz74ZPPjBYQGRJkumD2Z48Kqm8s5DJuhLA==",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "7.0.1"
}
},
"NetTopologySuite": {
"type": "Transitive",
"resolved": "2.5.0",
Expand All @@ -559,6 +548,14 @@
"System.Memory": "4.5.4"
}
},
"NetTopologySuite.IO.PostGis": {
"type": "Transitive",
"resolved": "2.1.0",
"contentHash": "3W8XTFz8iP6GQ5jDXK1/LANHiU+988k1kmmuPWNKcJLpmSg6CvFpbTpz+s4+LBzkAp64wHGOldSlkSuzYfrIKA==",
"dependencies": {
"NetTopologySuite": "[2.0.0, 3.0.0-A)"
}
},
"NLog": {
"type": "Transitive",
"resolved": "5.2.8",
Expand All @@ -574,6 +571,35 @@
"NLog": "5.2.8"
}
},
"Npgsql": {
"type": "Transitive",
"resolved": "8.0.2",
"contentHash": "MuJzLoWCaQhQAR3oh66YR0Ir6mxuezncGX3f8wxvAc21g0+9HICktJQlqMoODhxztZKXE5k9GxRxqUAN+vPb4g==",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "8.0.0"
}
},
"Npgsql.EntityFrameworkCore.PostgreSQL": {
"type": "Transitive",
"resolved": "8.0.2",
"contentHash": "eoZPynwkZTWFTgnocvXORuCL2yFZtscrUdqVhjxiRULpC7BMg9zhLM5oDZAU5PoX1PgN77hmkKE4a3PQiHqh7Q==",
"dependencies": {
"Microsoft.EntityFrameworkCore": "8.0.2",
"Microsoft.EntityFrameworkCore.Abstractions": "8.0.2",
"Microsoft.EntityFrameworkCore.Relational": "8.0.2",
"Npgsql": "8.0.2"
}
},
"Npgsql.NetTopologySuite": {
"type": "Transitive",
"resolved": "8.0.2",
"contentHash": "FQtqjMyZM9/V480rehWMah+KYqeBfCtk77n+pShPFZ2M+DSE+vn5tjpKZX02/oeTbWeExPBVya2idMttB0d7oQ==",
"dependencies": {
"NetTopologySuite": "2.5.0",
"NetTopologySuite.IO.PostGIS": "2.1.0",
"Npgsql": "8.0.2"
}
},
"Polly": {
"type": "Transitive",
"resolved": "7.2.4",
Expand All @@ -587,15 +613,6 @@
"Polly": "7.1.0"
}
},
"Pomelo.EntityFrameworkCore.MySql": {
"type": "Transitive",
"resolved": "8.0.2",
"contentHash": "XjnlcxVBLnEMbyEc5cZzgZeDyLvAniACZQ04W1slWN0f4rmfNzl98gEMvHnFH0fMDF06z9MmgGi/Sr7hJ+BVnw==",
"dependencies": {
"Microsoft.EntityFrameworkCore.Relational": "[8.0.2, 8.0.999]",
"MySqlConnector": "2.3.5"
}
},
"Roslynator.Analyzers": {
"type": "Transitive",
"resolved": "4.12.2",
Expand Down Expand Up @@ -944,7 +961,7 @@
"Microsoft.Extensions.Hosting": "[8.0.0, )",
"Microsoft.VisualStudio.Threading.Analyzers": "[17.9.28, )",
"NLog.Extensions.Logging": "[5.3.8, )",
"Pomelo.EntityFrameworkCore.MySql": "[8.0.2, )",
"Npgsql.EntityFrameworkCore.PostgreSQL": "[8.0.2, )",
"Roslynator.Analyzers": "[4.12.2, )",
"SharpSource": "[1.24.0, )",
"SonarAnalyzer.CSharp": "[9.24.0.89429, )",
Expand Down
2 changes: 1 addition & 1 deletion c#/imagePipeline/tbm.ImagePipeline.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
<ItemGroup>
<PackageReference Include="LanguageExt.Core" Version="4.4.8" />
<PackageReference Include="Microsoft.Extensions.Http.Polly" Version="8.0.4" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL.NetTopologySuite" Version="8.0.2" />
<PackageReference Include="OpenCvSharp4" Version="4.9.0.20240103" />
<PackageReference Include="OpenCvSharp4.runtime.win" Version="4.9.0.20240103" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql.NetTopologySuite" Version="8.0.2" />
<PackageReference Include="Sdcb.PaddleInference.runtime.win64.mkl" Version="2.5.1" />
<PackageReference Include="Sdcb.PaddleOCR" Version="2.7.0.1" />
<PackageReference Include="Sdcb.PaddleOCR.Models.Online" Version="2.7.0.1" />
Expand Down
26 changes: 14 additions & 12 deletions c#/shared/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,16 @@
"NLog": "5.2.8"
}
},
"Pomelo.EntityFrameworkCore.MySql": {
"Npgsql.EntityFrameworkCore.PostgreSQL": {
"type": "Direct",
"requested": "[8.0.2, )",
"resolved": "8.0.2",
"contentHash": "XjnlcxVBLnEMbyEc5cZzgZeDyLvAniACZQ04W1slWN0f4rmfNzl98gEMvHnFH0fMDF06z9MmgGi/Sr7hJ+BVnw==",
"contentHash": "eoZPynwkZTWFTgnocvXORuCL2yFZtscrUdqVhjxiRULpC7BMg9zhLM5oDZAU5PoX1PgN77hmkKE4a3PQiHqh7Q==",
"dependencies": {
"Microsoft.EntityFrameworkCore.Relational": "[8.0.2, 8.0.999]",
"MySqlConnector": "2.3.5"
"Microsoft.EntityFrameworkCore": "8.0.2",
"Microsoft.EntityFrameworkCore.Abstractions": "8.0.2",
"Microsoft.EntityFrameworkCore.Relational": "8.0.2",
"Npgsql": "8.0.2"
}
},
"Roslynator.Analyzers": {
Expand Down Expand Up @@ -459,19 +461,19 @@
"resolved": "8.0.0",
"contentHash": "bXJEZrW9ny8vjMF1JV253WeLhpEVzFo1lyaZu1vQ4ZxWUlVvknZ/+ftFgVheLubb4eZPSwwxBeqS1JkCOjxd8g=="
},
"MySqlConnector": {
"type": "Transitive",
"resolved": "2.3.5",
"contentHash": "AmEfUPkFl+Ev6jJ8Dhns3CYHBfD12RHzGYWuLt6DfG6/af6YvOMyPz74ZPPjBYQGRJkumD2Z48Kqm8s5DJuhLA==",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "7.0.1"
}
},
"NLog": {
"type": "Transitive",
"resolved": "5.2.8",
"contentHash": "jAIELkWBs1CXFPp986KSGpDFQZHCFccO+LMbKBTTNm42KifaI1mYzFMFQQfuGmGMTrCx0TFPhDjHDE4cLAZWiQ=="
},
"Npgsql": {
"type": "Transitive",
"resolved": "8.0.2",
"contentHash": "MuJzLoWCaQhQAR3oh66YR0Ir6mxuezncGX3f8wxvAc21g0+9HICktJQlqMoODhxztZKXE5k9GxRxqUAN+vPb4g==",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "8.0.0"
}
},
"System.Diagnostics.DiagnosticSource": {
"type": "Transitive",
"resolved": "8.0.0",
Expand Down
2 changes: 1 addition & 1 deletion c#/shared/tbm.Shared.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.4" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
<PackageReference Include="NLog.Extensions.Logging" Version="5.3.8" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="8.0.2" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.2" />
<PackageReference Include="SuperLinq" Version="6.0.0" />
</ItemGroup>
<Choose>
Expand Down

0 comments on commit e2ed71e

Please sign in to comment.