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

Interface TransactionalAdapter

persist/transaction.go:21–25  ·  view source on GitHub ↗

TransactionalAdapter defines the interface for adapters that support transactions. Adapters implementing this interface can participate in Casbin transactions.

Source from the content-addressed store, hash-verified

19// TransactionalAdapter defines the interface for adapters that support transactions.
20// Adapters implementing this interface can participate in Casbin transactions.
21type 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

Callers 1

BeginTransactionMethod · 0.65

Implementers 2

MockTransactionalAdaptertransaction_test.go
TransactionalEnforcerenforcer_transactional.go

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…