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

Method Round

postgres/parser/sem/tree/datum.go:892–894  ·  view source on GitHub ↗

Round returns a new DTime to the specified precision.

(precision time.Duration)

Source from the content-addressed store, hash-verified

890
891// Round returns a new DTime to the specified precision.
892func (d *DTime) Round(precision time.Duration) *DTime {
893 return MakeDTime(timeofday.TimeOfDay(*d).Round(precision))
894}
895
896// AmbiguousFormat implements the Datum interface.
897func (*DTime) AmbiguousFormat() bool { return true }

Callers 11

roundedFunction · 0.45
floatToNanosFunction · 0.45
ParseDTimeFunction · 0.45
RoundMethod · 0.45
MakeDTimestampFunction · 0.45
MakeDTimestampTZFunction · 0.45
truncateDIntervalFunction · 0.45
timetz.goFile · 0.45
round.goFile · 0.45
time.goFile · 0.45
minus.goFile · 0.45

Calls 2

TimeOfDayTypeAlias · 0.92
MakeDTimeFunction · 0.85

Tested by

no test coverage detected