Merge dev into fix/prettier

Brings in the Tours addon and the MikroORM follow-ups. Conflicts were
resolved to dev's content, then every file dev brought in was run through
prettier and eslint --fix so the branch stays uniformly formatted.
This commit is contained in:
Maurice
2026-10-07 15:43:13 +02:00
242 changed files with 22952 additions and 731 deletions
+17
View File
@@ -1010,3 +1010,20 @@ export function coalesceOverrideWhileSame(
}
return unsupported(platform);
}
// ---------------------------------------------------------------------------
// Tours (#2586): `DayAssignmentsRepository`'s assignment projection carries a
// place's route geometry only when the place is a Tour, so the day list never
// hauls an ordinary track's geometry along with every stop.
// ---------------------------------------------------------------------------
/**
* `CASE WHEN <testRef> IS NOT NULL THEN <thenRef> END`, for use as a
* `.select()` value (chain `.as(aliasName)` at the call site). The missing
* ELSE is deliberate: a null test column yields SQL NULL.
*/
export function caseWhenNotNull(platform: Platform, testRef: string, thenRef: string): RawQueryFragment {
if (platform instanceof SqlitePlatform)
return raw(`CASE WHEN ${column(testRef)} IS NOT NULL THEN ${column(thenRef)} END`);
return unsupported(platform);
}