Skip to content

Obsolete the provider-specific date/time types - #4019

Merged
roji merged 1 commit into
npgsql:mainfrom
roji:ObsoleteProviderSpecificDateTime
Oct 10, 2021
Merged

roji merged 1 commit into
npgsql:mainfrom
roji:ObsoleteProviderSpecificDateTime

Conversation

@roji

@roji roji commented Oct 6, 2021 •

Copy link
Copy Markdown
Member
  • NpgsqlDateTime, NpgsqlDate and NpgsqlTimeSpan are now obsolete. They will be removed in Npgsql 7.0.
  • NodaTime can be used to interact with values which are out-of-range for the BCL types.
  • To support values which are out-of-range for NodaTime, PostgreSQL timestamps can now be read/written as long, and dates can be read/written as int. These are the raw PostgreSQL representations, with no operations - they simply provide an "escape hatch" in case users need to interact with out-of-range values.
  • For interval, a new NpgsqlInterval struct has been introduced, which again contains the raw PostgreSQL data (months, days, time); no conversions, no methods - just pure raw data.

Closes #2009

/cc @Brar

Allow reading timestamps as long, dates as int, and intervals as
the newly-introduced NpgsqlInterval. All these are raw PostgreSQL
representations.

Closes npgsql#2009
@roji
roji force-pushed the ObsoleteProviderSpecificDateTime branch from 291aaf4 to b052c1f Compare October 9, 2021 06:51
@roji

roji commented Oct 9, 2021

Copy link
Copy Markdown
Member Author

@vonzshik just a reminder to look at this before we release rc2

@roji
roji merged commit 3d2a0af into npgsql:main Oct 10, 2021
@roji
roji deleted the ObsoleteProviderSpecificDateTime branch October 10, 2021 15:40
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.

Obsolete the provider-specific date/time types, replace with raw reading/writing

2 participants