MCPcopy Create free account
hub / github.com/abice/go-enum / Scan

Method Scan

example/sql_str_enum.go:154–163  ·  view source on GitHub ↗

Scan implements the Scanner interface.

(value interface{})

Source from the content-addressed store, hash-verified

152
153// Scan implements the Scanner interface.
154func (x *NullJobState) Scan(value interface{}) (err error) {
155 if value == nil {
156 x.JobState, x.Valid = JobState(0), false
157 return
158 }
159
160 err = x.JobState.Scan(value)
161 x.Valid = (err == nil)
162 return
163}
164
165// Value implements the driver Valuer interface.
166func (x NullJobState) Value() (driver.Value, error) {

Callers

nothing calls this directly

Calls 2

JobStateTypeAlias · 0.85
ScanMethod · 0.45

Tested by

no test coverage detected