MCPcopy Create free account
hub / github.com/Done-0/gin-scaffold / Scan

Method Scan

internal/model/base/base.go:30–40  ·  view source on GitHub ↗

Scan implements sql.Scanner interface

(value any)

Source from the content-addressed store, hash-verified

28
29// Scan implements sql.Scanner interface
30func (j *JSONMap) Scan(value any) error {
31 switch v := value.(type) {
32 case nil:
33 *j = make(JSONMap)
34 case []byte:
35 return json.Unmarshal(v, j)
36 default:
37 return errors.New("cannot scan into JSONMap")
38 }
39 return nil
40}
41
42// Value implements driver.Valuer interface
43func (j JSONMap) Value() (driver.Value, error) {

Callers 2

ensureMySQLDBExistsMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected