Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Binary ¶ added in v0.9.3
type Binary[T Serializable[T]] struct { Data T }
Binary[T] is a []byte which transparently Binary[T] data being submitted to a database and unmarshal data being Scanned from a database.
type NullBinary ¶ added in v0.9.3
type NullBinary[T Serializable[T]] struct { Data T Valid bool // Valid is true if Binary is not NULL }
NullBinary[T] represents a Binary that may be null. NullBinary[T] implements the scanner interface so it can be used as a scan destination, similar to NullString.
func (*NullBinary[T]) Scan ¶ added in v0.9.3
func (b *NullBinary[T]) Scan(src any) (err error)
Scan implements the sql.Scanner interface, unmashal the value coming off the wire and storing the raw result in the Binary[T].
Click to show internal directories.
Click to hide internal directories.