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

Method GetRelativeParseTime

pkg/sql/sem/tree/eval.go:3019–3025  ·  view source on GitHub ↗

GetRelativeParseTime implements ParseTimeContext.

()

Source from the content-addressed store, hash-verified

3017
3018// GetRelativeParseTime implements ParseTimeContext.
3019func (ctx *EvalContext) GetRelativeParseTime() time.Time {
3020 ret := ctx.TxnTimestamp
3021 if ret.IsZero() {
3022 ret = timeutil.Now()
3023 }
3024 return ret.In(ctx.GetLocation())
3025}
3026
3027// GetTxnTimestamp retrieves the current transaction timestamp as per
3028// the evaluation context. The timestamp is guaranteed to be nonzero.

Callers 4

GetTxnTimestampMethod · 0.95
GetTxnTimestampNoZoneMethod · 0.95
GetTxnTimeMethod · 0.95
GetTxnTimeNoZoneMethod · 0.95

Calls 2

GetLocationMethod · 0.95
NowFunction · 0.92

Tested by

no test coverage detected