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

Function NewTimestampType

server/types/timestamp.go:64–71  ·  view source on GitHub ↗

NewTimestampType returns Timestamp type with typmod set. // TODO: implement precision

(precision int32)

Source from the content-addressed store, hash-verified

62
63// NewTimestampType returns Timestamp type with typmod set. // TODO: implement precision
64func NewTimestampType(precision int32) (*DoltgresType, error) {
65 typmod, err := GetTypmodFromTimePrecision(precision)
66 if err != nil {
67 return nil, err
68 }
69 newType := *Timestamp.WithAttTypMod(typmod)
70 return &newType, nil
71}
72
73// serializeTypeTimestamp handles serialization from the standard representation to our serialized representation that is
74// written in Dolt.

Callers

nothing calls this directly

Calls 2

WithAttTypModMethod · 0.80

Tested by

no test coverage detected