Skip to content

Commit

Permalink
add scan to uuid
Browse files Browse the repository at this point in the history
  • Loading branch information
rekby committed Oct 23, 2024
1 parent bcbe650 commit a22f63d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
* Fixed scan to optional uuid

## v3.86.0
* Add workaround for bug in uuid send/receive from server. It is migration version. All native code and most database sql code worked with uuid continue to work.

Expand Down
7 changes: 7 additions & 0 deletions internal/table/scanner/scanner.go
Original file line number Diff line number Diff line change
Expand Up @@ -1101,6 +1101,13 @@ func (s *valueScanner) scanOptional(v interface{}, defaultValueForOptional bool)
val := value.NewUUIDIssue1501FixedBytesWrapper(src)
*v = &val
}
case **uuid.UUID:
if s.isNull() {
*v = nil
} else {
src := s.uuid()
*v = &src
}
case **interface{}:
if s.isNull() {
*v = nil
Expand Down

0 comments on commit a22f63d

Please sign in to comment.