MCPcopy Create free account
hub / github.com/dolthub/doltgresql / UnmarshalBinary

Method UnmarshalBinary

postgres/parser/uuid/codec.go:230–237  ·  view source on GitHub ↗

UnmarshalBinary implements the encoding.BinaryUnmarshaler interface. It will return an error if the slice isn't 16 bytes long.

(data []byte)

Source from the content-addressed store, hash-verified

228// UnmarshalBinary implements the encoding.BinaryUnmarshaler interface.
229// It will return an error if the slice isn't 16 bytes long.
230func (u *UUID) UnmarshalBinary(data []byte) error {
231 if len(data) != Size {
232 return fmt.Errorf("uuid: UUID must be exactly 16 bytes long, got %d bytes", len(data))
233 }
234 copy(u[:], data)
235
236 return nil
237}

Callers 7

ScanMethod · 0.95
UnmarshalMethod · 0.95
FromBytesFunction · 0.95
deserializeTypeDateFunction · 0.80
deserializeTypeNumericFunction · 0.80
deserializeTypeTimestampFunction · 0.80

Calls 1

ErrorfMethod · 0.65

Tested by

no test coverage detected