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
4 changes: 2 additions & 2 deletions v2/dbutils/bob_helpers/bob_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ func NullPtr[T any](v T) *sql.Null[T] {
}

// NullPtrFromPtr returns a pointer to a sql.Null[T] based on the provided *T.
// If the input pointer is nil, it returns nil, meaning "unset".
// If the input pointer is nil, it returns &sql.Null[T]{} “unset” Null[T].
// Otherwise, it returns &sql.Null[T]{V: *v, Valid: true}.
func NullPtrFromPtr[T any](v *T) *sql.Null[T] {
if v == nil {
return nil
return &sql.Null[T]{}
}
return &sql.Null[T]{
V: *v,
Expand Down