(ctx context.Context)
| 113 | } |
| 114 | |
| 115 | func ContextUpdatesRollbackTx(ctx context.Context) { |
| 116 | updatesVal := ctx.Value(waveObjUpdateKey) |
| 117 | if updatesVal == nil { |
| 118 | return |
| 119 | } |
| 120 | updates := updatesVal.(*contextUpdatesType) |
| 121 | if len(updates.UpdatesStack) <= 1 { |
| 122 | panic(fmt.Errorf("no updates transaction to rollback")) |
| 123 | } |
| 124 | updates.UpdatesStack = updates.UpdatesStack[:len(updates.UpdatesStack)-1] |
| 125 | } |
| 126 | |
| 127 | func ContextGetUpdatesRtn(ctx context.Context) UpdatesRtnType { |
| 128 | updatesMap := ContextGetUpdates(ctx) |