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

Function deserializeTypeDate

server/types/date.go:71–80  ·  view source on GitHub ↗

deserializeTypeDate handles deserialization from the Dolt serialized format to our standard representation used by expressions and nodes.

(ctx *sql.Context, _ *DoltgresType, data []byte)

Source from the content-addressed store, hash-verified

69// deserializeTypeDate handles deserialization from the Dolt serialized format to our standard representation used by
70// expressions and nodes.
71func deserializeTypeDate(ctx *sql.Context, _ *DoltgresType, data []byte) (any, error) {
72 if len(data) == 0 {
73 return nil, nil
74 }
75 t := time.Time{}
76 if err := t.UnmarshalBinary(data); err != nil {
77 return nil, err
78 }
79 return t, nil
80}

Callers

nothing calls this directly

Calls 1

UnmarshalBinaryMethod · 0.80

Tested by

no test coverage detected