Skip to content

@ts-safeql/generate@5.3.0

Choose a tag to compare

@github-actions github-actions released this 11 Jun 08:17
· 2 commits to main since this release
2b02810

Minor Changes

  • 1933241: Improve view nullability typing.

    PostgreSQL reports view columns as nullable by default, so SafeQL previously over-widened many generated types. SafeQL now inspects the view definition and infers non-nullability from the actual SQL expression, while staying conservative when a view cannot be proven safely.

Patch Changes

  • c3de392: Fix RIGHT/FULL JOIN nullability when the base (left) relation is aliased.

    A column selected from the base relation of a RIGHT/FULL JOIN is nullable (its row may be absent when the other side has no match), and SafeQL already inferred this when the base relation had no alias. But the base relation's alias was never tracked, so SELECT m.id FROM member m RIGHT JOIN member_team mt ON ... incorrectly typed m.id as non-null. The join analysis now records the base relation's alias and matches nullability against it, so aliased and unaliased base relations behave the same.