Skip to content

Nuget packages updated #434

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

Merged
merged 50 commits into from
Apr 24, 2025
Merged

Nuget packages updated #434

merged 50 commits into from
Apr 24, 2025

Conversation

alex-kulakov
Copy link
Contributor

Updated packages

  • BitFaster.Caching
  • log4net
  • NLog
  • Firebird client library
  • Oracle client library
  • MySQL client library
  • MS SQL Server library
  • PostgreSQL client Library

Various changes for PostgreSql that ware required to make for newversion of library to work, including

  • Improved .Milliseconds part translation for types that have the part
  • Improved TimeSpan.TotalMilliseconds translation
  • AppContext switch Npgsql.EnableLegacyTimestampBehavior made to be turned off if the user hasn't set it before Domain build, though both states are supported.
  • AppContext switch Npgsql.DisableDateTimeInfinityConversions is turned on if the user hasn't set it before Domain build, this is done to not allow Npgsql to convert MinValue and MaxValue of certain types, if the user wants such conversion, we support both states of the switch.
  • When infinity conversions are enabled, extra statements are added into SQL queries for certain operations to return expected results.
  • DateTime values '0001.01.01 00:00:00.00000' and '9999.12.31 23:59:59.99999' will be read as MinValue and MaxValue accordingly.
  • DateTimeOffset values '0001.01.01 00:00:00.00000+00:00' and '9999.12.31 23:59:59.99999+00:00' will be read as MinValue and MaxValue accordingly
  • When legacy timestamp behavior is disabled, connection time zone is applied to DateTimeOffset values if possible, otherwise, to local one. We try to find system time zone for connection time zone by using TimeZoneInfo, including offsets in POSIX format, if there is no such time zone found DateTimeOffset.ToLocalTime() will be used.
  • TimeSpans based on values lower than -9223372036854775800L and higher 92233720368547758xxL will be read as MinValue and MaxValue accordingly. Server type has lower resolution and data will be lost anyway, this is done for convenience of further comparisons by the user.

and pass postgre abstract driver to compiler/typemapper not the generic one
ALSO
- Added setting of two Postgre AppDomain switches. The first one disables
  DateTime/DateOnly/DateTimeOffset's min and max value conversion to
  Infinity/-Infinity, without it many of operations with the types are more
  complicated because require checks for infinities to provide correct results
  of queries.
  Second one disable legacy timestamps behavior, this legacy mode can be
  removed at any point of time in future we can't rely on it.
…eOffset

Since we have to support Npgsql conversion of the values to infinity/-infinity
we need to test such behavior
Switches are initialized in global test setup via TestConfiguration if necessary
…ersion

Server-side version has reduced fractions which can cause problems
on comparison with .NET values.
- Some tests became Postgre-only
- removed temporary logging of commands
When infinity aliases enabled Npgsql makes correct replacement,
otherwise we replace "max value" from server with true max value
Some parts are extracted from infinity as null value and some parts as
double.Infinity
- TimeSpan reading assumes some values as MinValue/MaxValue, otherwise
  writing and then reading of MinValue/MaxValue will not be the same
  because of different number of fractional points in Postgre and .NET.
  We loose 18 particular values for comfort of comparison (we loose them
  anyway because of PG resolution). The odds of having MaxValue - 1-to-7
  ticks or MinValue + 1-to-8 ticks as true values are extremely low.
- some comments improved
- operations based on server-side predefined constant values, not on
  defined results on client-side, in long term it is better and more reliable
- small code improvements
- fix of IntervalToMilliseconds for 9.0+ versions which lacked trunc operation
no loading data from server
# Conflicts:
#	Orm/Xtensive.Orm.PostgreSql/Sql.Drivers.PostgreSql/v8_0/Compiler.cs
#	Orm/Xtensive.Orm.Tests.Sql/PostgreSql/IntervalToMillisecondsTest.cs
Tests require PostgreSQL so model should not have them in model
# Conflicts:
#	ChangeLog/7.2.0-Beta-2-dev.txt
@alex-kulakov alex-kulakov merged commit 7854f0f into master Apr 24, 2025
@alex-kulakov alex-kulakov deleted the master-packages-update branch April 25, 2025 05:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant