Skip to content

fix: Scan(nil) clears a previous ULID - #136

Open
SashaMIT wants to merge 1 commit into
oklog:mainfrom
SashaMIT:fix/scan-nil-clears
Open

SashaMIT wants to merge 1 commit into
oklog:mainfrom
SashaMIT:fix/scan-nil-clears

Conversation

@SashaMIT

@SashaMIT SashaMIT commented Oct 2, 2026 •

Copy link
Copy Markdown

Summary

Scan(nil) returned a nil error and left the previous ULID in place. A NULL from the database into a reused value still looked like the old id. It is now the zero ULID. A text ULID and a 16-byte ULID still scan as before.

Test plan

  • go test -count=1 .

@peterbourgon @tsenart

A NULL scan returned success and left the previous value in place, so a reused destination still looked like the old id. NULL now stores the zero ULID.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant