MCPcopy
hub / github.com/tinode/chat / Scan

Method Scan

server/store/types/types.go:686–691  ·  view source on GitHub ↗

Scan is an implementation of sql.Scanner interface. It expects the value to be a byte slice representation of an ASCII string.

(val any)

Source from the content-addressed store, hash-verified

684// Scan is an implementation of sql.Scanner interface. It expects the
685// value to be a byte slice representation of an ASCII string.
686func (m *AccessMode) Scan(val any) error {
687 if bb, ok := val.([]byte); ok {
688 return m.UnmarshalText(bb)
689 }
690 return errors.New("scan failed: data is not a byte slice")
691}
692
693// Value is an implementation of sql.driver.Valuer interface.
694func (m AccessMode) Value() (driver.Value, error) {

Callers

nothing calls this directly

Calls 1

UnmarshalTextMethod · 0.95

Tested by

no test coverage detected