MCPcopy
hub / github.com/apache/casbin / checkTransactionStatus

Method checkTransactionStatus

transaction.go:72–77  ·  view source on GitHub ↗

checkTransactionStatus checks if the transaction is active.

()

Source from the content-addressed store, hash-verified

70
71// checkTransactionStatus checks if the transaction is active.
72func (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.

Callers 8

AddNamedPolicyMethod · 0.95
AddNamedPoliciesMethod · 0.95
RemoveNamedPolicyMethod · 0.95
RemoveNamedPoliciesMethod · 0.95
UpdateNamedPolicyMethod · 0.95
GetBufferedModelMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected