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

Method Scan

example/sql_enum.go:199–209  ·  view source on GitHub ↗

Scan implements the Scanner interface.

(value interface{})

Source from the content-addressed store, hash-verified

197
198// Scan implements the Scanner interface.
199func (x *NullProjectStatus) Scan(value interface{}) (err error) {
200 x.Set = true
201 if value == nil {
202 x.ProjectStatus, x.Valid = ProjectStatus(0), false
203 return
204 }
205
206 err = x.ProjectStatus.Scan(value)
207 x.Valid = (err == nil)
208 return
209}
210
211// Value implements the driver Valuer interface.
212func (x NullProjectStatus) Value() (driver.Value, error) {

Callers 1

UnmarshalJSONMethod · 0.95

Calls 2

ProjectStatusTypeAlias · 0.85
ScanMethod · 0.45

Tested by

no test coverage detected