Skip to content

Commit

Permalink
Update Npgsql Version 3.2.7 to 8.0.2 (#980)
Browse files Browse the repository at this point in the history
* Update Npgsql Version=3.2.7 to 8.0.2

* Disable infinity conversions for datetime
https://www.npgsql.org/efcore/release-notes/6.0.html?tabs=annotations

(cherry picked from commit 00f416f)
  • Loading branch information
claudiamurialdo committed May 13, 2024
1 parent 979f610 commit 34886cb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dotnet/src/dotnetcore/GxClasses/GxClasses.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.ApplicationInsights" Version="2.22.0" PrivateAssets="ALL" />
<PackageReference Include="Azure.Monitor.OpenTelemetry.Exporter" Version="1.1.0" PrivateAssets="All" />
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.7.0" PrivateAssets="All"/>
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.7.0" PrivateAssets="All" />
<PackageReference Include="OpenTelemetry.Exporter.Console" Version="1.7.0" PrivateAssets="All" />
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="8.0.0" />
<PackageReference Include="Microsoft.Win32.Registry" Version="4.7.0" />
Expand All @@ -170,7 +170,7 @@
<PackageReference Include="NetTopologySuite.Core" Version="1.15.3" />
<PackageReference Include="NodaTime" Version="3.1.9" />
<PackageReference Include="Novell.Directory.Ldap.NETStandard" Version="3.3.1" />
<PackageReference Include="Npgsql" Version="3.2.7" />
<PackageReference Include="Npgsql" Version="8.0.2" />
<PackageReference Include="Sandwych.GeographicLib" Version="1.49.3" />
<PackageReference Include="Stubble.Core" Version="1.8.4" />
<PackageReference Include="System.DirectoryServices" Version="4.7.0" />
Expand Down
6 changes: 6 additions & 0 deletions dotnet/src/dotnetframework/GxClasses/Data/GXDataPostgreSQL.cs
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,9 @@ public override string ConcatOp(int pos)
sealed internal class PostgresqlConnectionWrapper : GxAbstractConnectionWrapper
{
static readonly IGXLogger log = GXLoggerFactory.GetLogger<PostgresqlConnectionWrapper>();
#if NETCORE
const string INFINITY_CONVERSIONS = "Npgsql.DisableDateTimeInfinityConversions";
#endif
public PostgresqlConnectionWrapper()
{
_connection = (IDbConnection)ClassLoader.CreateInstance(GxPostgreSql.NpgsqlAssembly, "Npgsql.NpgsqlConnection");
Expand All @@ -597,6 +600,9 @@ public PostgresqlConnectionWrapper(String connectionString, GxConnectionCache co
try
{
_connection = (IDbConnection)ClassLoader.CreateInstance(GxPostgreSql.NpgsqlAssembly, "Npgsql.NpgsqlConnection", new object[] { connectionString });
#if NETCORE
AppContext.SetSwitch(INFINITY_CONVERSIONS, true);
#endif
m_isolationLevel = isolationLevel;
m_connectionCache = connCache;
}
Expand Down

0 comments on commit 34886cb

Please sign in to comment.