Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Null ¶
Null represents a value that may be null. Null implements the [Scanner] interface so it can be used as a scan destination:
var s Null[string]
err := db.QueryRow("SELECT name FROM foo WHERE id=?", id).Scan(&s)
...
if s.Valid {
// use s.V
} else {
// NULL value
}
T should be one of the types accepted by driver.Value.
Click to show internal directories.
Click to hide internal directories.