Skip to content

Commit 7bec73c

Browse files
correctly handle nil pointer values for nullable columns
1 parent fea03f8 commit 7bec73c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

oracle/common.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,10 @@ func convertValue(val interface{}) interface{} {
218218

219219
// Dereference pointers
220220
rv := reflect.ValueOf(val)
221+
if rv.Kind() == reflect.Ptr && rv.IsNil() {
222+
return nil
223+
}
224+
221225
for rv.Kind() == reflect.Ptr && !rv.IsNil() {
222226
rv = rv.Elem()
223227
val = rv.Interface()

0 commit comments

Comments
 (0)