MCPcopy
hub / github.com/sqlc-dev/sqlc / Scan

Method Scan

examples/booktest/postgresql/models.go:21–31  ·  view source on GitHub ↗
(src interface{})

Source from the content-addressed store, hash-verified

19)
20
21func (e *BookType) Scan(src interface{}) error {
22 switch s := src.(type) {
23 case []byte:
24 *e = BookType(s)
25 case string:
26 *e = BookType(s)
27 default:
28 return fmt.Errorf("unsupported scan type for BookType: %T", src)
29 }
30 return nil
31}
32
33type NullBookType struct {
34 BookType BookType

Callers 14

ScanMethod · 0.45
BooksByTagsMethod · 0.45
BooksByTitleYearMethod · 0.45
CreateAuthorMethod · 0.45
CreateBookMethod · 0.45
GetAuthorMethod · 0.45
GetBookMethod · 0.45
SayHelloMethod · 0.45
BooksByTagsMethod · 0.45
BooksByTitleYearMethod · 0.45
CreateAuthorMethod · 0.45
CreateBookMethod · 0.45

Calls 1

BookTypeTypeAlias · 0.70

Tested by

no test coverage detected