MCPcopy Create free account
hub / github.com/auxten/postgresql-parser / Round

Method Round

pkg/sql/sem/tree/datum.go:1960–1962  ·  view source on GitHub ↗

Round returns a new DTime to the specified precision.

(precision time.Duration)

Source from the content-addressed store, hash-verified

1958
1959// Round returns a new DTime to the specified precision.
1960func (d *DTime) Round(precision time.Duration) *DTime {
1961 return MakeDTime(timeofday.TimeOfDay(*d).Round(precision))
1962}
1963
1964// Next implements the Datum interface.
1965func (d *DTime) Next(_ *EvalContext) (Datum, bool) {

Callers 9

floatToNanosFunction · 0.45
ParseDTimeFunction · 0.45
RoundMethod · 0.45
MakeDTimestampFunction · 0.45
MakeDTimestampTZFunction · 0.45
truncateDIntervalFunction · 0.45
GetTxnTimeMethod · 0.45
GetTxnTimeNoZoneMethod · 0.45
PerformCastFunction · 0.45

Calls 2

TimeOfDayTypeAlias · 0.92
MakeDTimeFunction · 0.85

Tested by

no test coverage detected