checkTransactionStatus checks if the transaction is active.
()
| 70 | |
| 71 | // checkTransactionStatus checks if the transaction is active. |
| 72 | func (tx *Transaction) checkTransactionStatus() error { |
| 73 | if tx.committed || tx.rolledBack { |
| 74 | return errors.New("transaction is not active") |
| 75 | } |
| 76 | return nil |
| 77 | } |
| 78 | |
| 79 | // AddNamedPolicy adds a named policy within the transaction. |
| 80 | // The policy is buffered and will be applied when the transaction is committed. |
no outgoing calls
no test coverage detected