From bea267f45a2c9a39935a454d44fbde0cce8998fc Mon Sep 17 00:00:00 2001 From: Timothy Drago Date: Mon, 4 Aug 2025 13:03:18 +0200 Subject: [PATCH] fix boolean --- v2/dbutils/bob_helpers/bob_helpers.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/v2/dbutils/bob_helpers/bob_helpers.go b/v2/dbutils/bob_helpers/bob_helpers.go index 0173868..792044c 100644 --- a/v2/dbutils/bob_helpers/bob_helpers.go +++ b/v2/dbutils/bob_helpers/bob_helpers.go @@ -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) }