MCPcopy Create free account
hub / github.com/cockroachdb/cockroachdb-parser / NewDInterval

Function NewDInterval

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

NewDInterval creates a new DInterval.

(d duration.Duration, itm types.IntervalTypeMetadata)

Source from the content-addressed store, hash-verified

3141
3142// NewDInterval creates a new DInterval.
3143func NewDInterval(d duration.Duration, itm types.IntervalTypeMetadata) *DInterval {
3144 truncateInterval(&d, itm)
3145 return &DInterval{Duration: d}
3146}
3147
3148// ParseDInterval parses and returns the *DInterval Datum value represented by the provided
3149// string, or an error if parsing is unsuccessful.

Callers 3

AdjustValueToTypeFunction · 0.85
DatumPrevFunction · 0.85
DatumNextFunction · 0.85

Calls 1

truncateIntervalFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…