Skip to content

Commit d892eeb

Browse files
authored
Merge pull request #1524 add scan to uuid
add scan to uuid
2 parents bcbe650 + a22f63d commit d892eeb

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
* Fixed scan to optional uuid
2+
13
## v3.86.0
24
* 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.
35

internal/table/scanner/scanner.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1101,6 +1101,13 @@ func (s *valueScanner) scanOptional(v interface{}, defaultValueForOptional bool)
11011101
val := value.NewUUIDIssue1501FixedBytesWrapper(src)
11021102
*v = &val
11031103
}
1104+
case **uuid.UUID:
1105+
if s.isNull() {
1106+
*v = nil
1107+
} else {
1108+
src := s.uuid()
1109+
*v = &src
1110+
}
11041111
case **interface{}:
11051112
if s.isNull() {
11061113
*v = nil

0 commit comments

Comments
 (0)