MCPcopy Create free account
hub / github.com/google/uuid / NullUUID

Struct NullUUID

null.go:29–32  ·  view source on GitHub ↗

NullUUID represents a UUID that may be null. NullUUID implements the SQL driver.Scanner interface so it can be used as a scan destination: var u uuid.NullUUID err := db.QueryRow("SELECT name FROM foo WHERE id=?", id).Scan(&u) ... if u.Valid { use u.UUID } else { NULL value }

Source from the content-addressed store, hash-verified

27// }
28//
29type NullUUID struct {
30 UUID UUID
31 Valid bool // Valid is true if UUID is not NULL
32}
33
34// Scan implements the SQL driver.Scanner interface.
35func (nu *NullUUID) Scan(value interface{}) error {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected