Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions v2/dbutils/bob_helpers/bob_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ func NullPtrFromPtr[T any](v *T) *sql.Null[T] {

// isZero checks whether v is the zero value of its type.
func isZero[T any](v T) bool {
// Special case for bool: always consider it non-zero (i.e., always valid)
switch any(v).(type) {
case bool:
return false
}
var zero T
return reflect.DeepEqual(v, zero)
}