GetTxnTimestamp retrieves the current transaction timestamp as per the evaluation context. The timestamp is guaranteed to be nonzero.
(precision time.Duration)
| 3027 | // GetTxnTimestamp retrieves the current transaction timestamp as per |
| 3028 | // the evaluation context. The timestamp is guaranteed to be nonzero. |
| 3029 | func (ctx *EvalContext) GetTxnTimestamp(precision time.Duration) *DTimestampTZ { |
| 3030 | // TODO(knz): a zero timestamp should never be read, even during |
| 3031 | // Prepare. This will need to be addressed. |
| 3032 | if !ctx.PrepareOnly && ctx.TxnTimestamp.IsZero() { |
| 3033 | panic(errors.AssertionFailedf("zero transaction timestamp in EvalContext")) |
| 3034 | } |
| 3035 | return MakeDTimestampTZ(ctx.GetRelativeParseTime(), precision) |
| 3036 | } |
| 3037 | |
| 3038 | // GetTxnTimestampNoZone retrieves the current transaction timestamp as per |
| 3039 | // the evaluation context. The timestamp is guaranteed to be nonzero. |
nothing calls this directly
no test coverage detected