Scan stores the src in *b.
(src any)
| 46 | |
| 47 | // Scan stores the src in *b. |
| 48 | func (b *Byte) Scan(src any) error { |
| 49 | switch src.(type) { |
| 50 | case uint8: |
| 51 | *b = Byte(src.(uint8)) |
| 52 | case string: |
| 53 | *b = Byte(src.(string)[0]) |
| 54 | case []byte: |
| 55 | *b = Byte(src.([]byte)[0]) |
| 56 | default: |
| 57 | return errors.New("incompatible type for byte") |
| 58 | } |
| 59 | |
| 60 | return nil |
| 61 | } |
| 62 | |
| 63 | // Randomize for sqlboiler |
| 64 | func (b *Byte) Randomize(nextInt func() int64, fieldType string, shouldBeNull bool) { |