GetTxnTimeNoZone retrieves the current transaction time as per the evaluation context.
(precision time.Duration)
| 3063 | // GetTxnTimeNoZone retrieves the current transaction time as per |
| 3064 | // the evaluation context. |
| 3065 | func (ctx *EvalContext) GetTxnTimeNoZone(precision time.Duration) *DTime { |
| 3066 | // TODO(knz): a zero timestamp should never be read, even during |
| 3067 | // Prepare. This will need to be addressed. |
| 3068 | if !ctx.PrepareOnly && ctx.TxnTimestamp.IsZero() { |
| 3069 | panic(errors.AssertionFailedf("zero transaction timestamp in EvalContext")) |
| 3070 | } |
| 3071 | return MakeDTime(timeofday.FromTime(ctx.GetRelativeParseTime().Round(precision))) |
| 3072 | } |
| 3073 | |
| 3074 | // SetTxnTimestamp sets the corresponding timestamp in the EvalContext. |
| 3075 | func (ctx *EvalContext) SetTxnTimestamp(ts time.Time) { |
nothing calls this directly
no test coverage detected