Skip to content

Release 4.3.0

Latest

Choose a tag to compare

@SamMaxwell SamMaxwell released this 13 Jun 18:03

Added

  • Optional ON CONFLICT DO NOTHING race backstop in upsertMutation.
    Pass { onConflict: 'DO NOTHING' } to append ON CONFLICT DO NOTHING
    to the generated INSERT (default: omitted, so existing output is
    unchanged). This is a complement to the always-present
    WHERE NOT EXISTS, not a replacement: WHERE NOT EXISTS still prevents
    serial/bigserial sequence churn, while ON CONFLICT DO NOTHING closes
    the concurrency race where two writers both pass the not-exists check
    and then collide on the unique constraint. It only affects the insert
    half.

Changed

  • Generated SQL now uses uppercase keywords (SELECT, INSERT INTO,
    WHERE NOT EXISTS, IS DISTINCT FROM, …) across updateMutation and
    upsertMutation. Purely cosmetic — the statements are semantically
    identical — but any test or snapshot asserting on the old lowercase
    output needs updating.