v5.0.0
What's new in v5.0
Two new range domains — the first additions beyond PostgreSQL's six built-ins, chosen because their element types clear the same bar (a total order the type's own comparisons agree with, and a defined step where adjacency needs one):
TimeRange(core package) — a time-of-day range overTimeOnly, the equivalent of the most common custom range type in PostgreSQL practice:CREATE TYPE timerange AS RANGE (subtype = time). Continuous, half-open by default, so[09:00, 12:00)and[12:00, 17:00)compose the way opening hours and shifts do. A window that crosses midnight is two ranges — whichRangeSetrepresents naturally. See TimeRange and the custom timerange type for the EF Core mapping.YearMonthRange(NodaTime satellite) — a month-granularity range over NodaTime'sYearMonthfor billing and reporting periods. Discrete with a one-month step:[2024-01, 2024-03]and[2024-04, 2024-06]are adjacent and merge. The EF Core NodaTime satellite stores it as a month-aligneddaterange— no custom database type needed, and every operator works server-side. Conversions to and fromLocalDateRangeandDateIntervalare included.
Both types carry the complete algebra, multiranges, literals, JSON support and aggregate overloads of the existing eight. The EF Core packages map them by convention; timerange needs two one-line opt-ins on the database side (documented below).
v5.0 contains no breaking changes to existing APIs; the major bump marks the model growing beyond the PostgreSQL built-ins.