GetModelSnapshot returns the model snapshot taken at transaction start. This represents the original state before any transaction operations.
()
| 70 | // GetModelSnapshot returns the model snapshot taken at transaction start. |
| 71 | // This represents the original state before any transaction operations. |
| 72 | func (tb *TransactionBuffer) GetModelSnapshot() model.Model { |
| 73 | tb.mutex.RLock() |
| 74 | defer tb.mutex.RUnlock() |
| 75 | return tb.modelSnapshot.Copy() |
| 76 | } |
| 77 | |
| 78 | // ApplyOperationsToModel applies all buffered operations to a model and returns the result. |
| 79 | // This simulates what the model would look like after all operations are applied. |
no test coverage detected