Map NodaTime Interval to tstzrange
See original GitHub issueI somehow managed to miss NodaTime’s Interval type. This is a perfect match for PostgreSQL tstzrange
, similarly to how we map DateInterval to PostgreSQL daterange
.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
NodaTime Type Plugin
Npgsql provides a plugin that allows mapping the NodaTime date/time library; this is the recommended way to interact with PostgreSQL date/time types, ...
Read more >Developers - Map NodaTime Interval to tstzrange -
Map NodaTime Interval to tstzrange. ... This is a perfect match for PostgreSQL tstzrange , similarly to how we map DateInterval to PostgreSQL...
Read more >Struct Interval | Noda Time
Initializes a new instance of the Interval struct. The interval includes the start instant and excludes the end instant. The end may equal...
Read more >Can i use daterange column and work with EF for ...
Generally i have report data for some date range and i want to insert new, and delete old one for the same period....
Read more >Postgres Infinity Timestamp
Postgres Infinity Timestamp The timestamptz is defined as timestamp with timezone. Hence the timestamp holds finite value.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I can easily get around the issue because I use Dapper on top of npgsql and already have type handlers so that Dapper correctly maps properties with non default types, so the fix is not top-priority. I even updated the handler so that it accepts both
Interval[]
andNpgsqlRange<Instant>[]
, in case the fix is integrated later and I forget about the issue when upgrading my nugets.But I opened the issue 😃
@madmox the non-contiguous aspect of multiranges may indeed be a reason to continue using arrays, true.
If using NodaTime
Interval[]
is important for you, please open a new issue - I can’t promise I’ll get around to it immediately though.