(ctx context.Context)
| 80 | } |
| 81 | |
| 82 | func (s *Storage) Commit(ctx context.Context) error { |
| 83 | tx, ok := TxFromContext(ctx) |
| 84 | if !ok { |
| 85 | // No tx on context — caller didn't BeginTX, or already |
| 86 | // committed. Treat as no-op (matches Memory store's behavior; |
| 87 | // fosite's MaybeCommitTx never reaches here without a tx). |
| 88 | return nil |
| 89 | } |
| 90 | return tx.Commit(ctx) |
| 91 | } |
| 92 | |
| 93 | func (s *Storage) Rollback(ctx context.Context) error { |
| 94 | tx, ok := TxFromContext(ctx) |