TransactionalAdapter defines the interface for adapters that support transactions. Adapters implementing this interface can participate in Casbin transactions.
| 19 | // TransactionalAdapter defines the interface for adapters that support transactions. |
| 20 | // Adapters implementing this interface can participate in Casbin transactions. |
| 21 | type TransactionalAdapter interface { |
| 22 | Adapter |
| 23 | // BeginTransaction starts a new transaction and returns a transaction context. |
| 24 | BeginTransaction(ctx context.Context) (TransactionContext, error) |
| 25 | } |
| 26 | |
| 27 | // TransactionContext represents a database transaction context. |
| 28 | // It provides methods to commit or rollback the transaction and get an adapter |
no outgoing calls
no test coverage detected
searching dependent graphs…