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

Function MakeDTimestamp

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

MakeDTimestamp creates a DTimestamp with specified precision.

(t time.Time, precision time.Duration)

Source from the content-addressed store, hash-verified

2606
2607// MakeDTimestamp creates a DTimestamp with specified precision.
2608func MakeDTimestamp(t time.Time, precision time.Duration) (_ *DTimestamp, err error) {
2609 if t, err = roundAndCheck(t, precision); err != nil {
2610 return nil, err
2611 }
2612 return &DTimestamp{Time: t}, nil
2613}
2614
2615// MustMakeDTimestamp wraps MakeDTimestamp but panics if there is an error.
2616// This is intended for testing applications only.

Callers 4

MustMakeDTimestampFunction · 0.85
ParseDTimestampFunction · 0.85
RoundMethod · 0.85

Calls 1

roundAndCheckFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…