GetTxnTime retrieves the current transaction time as per the evaluation context.
(precision time.Duration)
| 3052 | // GetTxnTime retrieves the current transaction time as per |
| 3053 | // the evaluation context. |
| 3054 | func (ctx *EvalContext) GetTxnTime(precision time.Duration) *DTimeTZ { |
| 3055 | // TODO(knz): a zero timestamp should never be read, even during |
| 3056 | // Prepare. This will need to be addressed. |
| 3057 | if !ctx.PrepareOnly && ctx.TxnTimestamp.IsZero() { |
| 3058 | panic(errors.AssertionFailedf("zero transaction timestamp in EvalContext")) |
| 3059 | } |
| 3060 | return NewDTimeTZFromTime(ctx.GetRelativeParseTime().Round(precision)) |
| 3061 | } |
| 3062 | |
| 3063 | // GetTxnTimeNoZone retrieves the current transaction time as per |
| 3064 | // the evaluation context. |
nothing calls this directly
no test coverage detected