Repository navigation
v1.1.4
npm 1.1.4 (full lockstep across all 14 @metaobjectsdev/* publish candidates), PyPI 1.1.4, NuGet 1.1.4 and Maven Central 8.1.4.
Added
- Calendar-aligned relative report windows. A relative date in a report, segment or measure
filter can now carrystartOf:{ "now": "-P90D", "startOf": "day" }is midnight UTC 90 days
back, where{ "now": "-P90D" }is 90 days before the moment of the query.startOfisday,
week(ISO, Monday) ormonth; the duration is applied first, then the result is truncated.
The truncation is written into the report view SQL for Postgres, SQLite/D1 and MySQL, so every
port that reads the view gets it. Any otherstartOf, or an extra key, is refused with
ERR_BAD_ATTR_FILTERin every port. Pinned by thereporting-relative-startof,
error-relative-date-bad-startofanderror-relative-date-extra-keyconformance fixtures and
the persistencereport-relative-datescenario, which seeds a row a minute either side of the
window start. UTC only; there is no time-zone form.metamodelVersionmoves1.1to1.2
(a new accepted filter value form, no registered attribute): a model that usesstartOfneeds
every port at this version. A model that does not use it is unchanged. See
docs/features/reporting.md.
Changed
- A list or report sort puts nulls last ascending and first descending, on every engine, in
all five ports. Nulls sort as larger than any value, which is Postgres's own default, so
Postgres output does not change; SQLite and MySQL sorted output does for any column with
nulls: those engines used to put a null first ascending. It applies to every?sort=the
generated routes and the runtimeObjectManagerdrivers emit (TypeScript, C#, Java, Kotlin,
Python), using nativeNULLS LAST/NULLS FIRSTwhere the engine has it and a leading
col IS NULLkey where it does not (MySQL). Pinned by the api-contractreport/scenario
sort-null-ordering; see api-contract.md.
Fixed
- A relative date with months or years now lands on the same day on SQLite and D1 as on
Postgres and MySQL. SQLite rolls an overflowing month shift into the next month, so
{ "now": "-P1M" }on March 31 was March 3 in a SQLite view and February 28 on Postgres, and
withstartOf: "month"the window started a whole month late. The SQLite view SQL now clamps
the shift to the last day of the target month, as Postgres and MySQL do, and applies years and
months as one month count. A SQLite report view whose relative date has a month or year
component gets new SQL, someta migrateproposes recreating it; nothing else changes.