We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 92c1b2c commit 3729070Copy full SHA for 3729070
null.go
@@ -92,6 +92,11 @@ func (n Null[T]) Value() (driver.Value, error) {
92
return n.V, nil
93
}
94
95
+// NewNull returns a new, non-null Null.
96
+func NewNull[T any](v T) Null[T] {
97
+ return Null[T]{V: v, Valid: true}
98
+}
99
+
100
var errNilPtr = errors.New("destination pointer is nil") // embedded in descriptive error
101
102
// convertAssign is the same as convertAssignRows, but without the optional
0 commit comments