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

Function deserializeTypeTimestamp

server/types/timestamp.go:81–90  ·  view source on GitHub ↗

deserializeTypeTimestamp 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

79// deserializeTypeTimestamp handles deserialization from the Dolt serialized format to our standard representation used by
80// expressions and nodes.
81func deserializeTypeTimestamp(ctx *sql.Context, _ *DoltgresType, data []byte) (any, error) {
82 if len(data) == 0 {
83 return nil, nil
84 }
85 t := time.Time{}
86 if err := t.UnmarshalBinary(data); err != nil {
87 return nil, err
88 }
89 return t, nil
90}

Callers

nothing calls this directly

Calls 1

UnmarshalBinaryMethod · 0.80

Tested by

no test coverage detected