Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrAlreadyCommitted is returned when attempting to commit or rollback an already committed transaction ErrAlreadyCommitted = errors.New("transaction already committed") // ErrAlreadyRolledBack is returned when attempting to commit or rollback an already rolled back transaction ErrAlreadyRolledBack = errors.New("transaction already rolled back") // ErrHookFailed is returned when a critical hook fails ErrHookFailed = errors.New("critical hook failed") // ErrInvalidSavepoint is returned when a savepoint is invalid or belongs to a different transaction ErrInvalidSavepoint = errors.New("invalid savepoint") )
Functions ¶
This section is empty.
Types ¶
type HookError ¶
HookError wraps an error that occurred during hook execution
type OperationError ¶
OperationError wraps an error that occurred during operation execution
func (*OperationError) Error ¶
func (e *OperationError) Error() string
func (*OperationError) Unwrap ¶
func (e *OperationError) Unwrap() error
type PanicError ¶
type PanicError struct {
Value interface{}
Stack string
}
PanicError wraps a recovered panic
func (*PanicError) Error ¶
func (e *PanicError) Error() string
type RollbackError ¶
type RollbackError struct {
Errors []error
}
RollbackError wraps errors that occurred during rollback
func (*RollbackError) Error ¶
func (e *RollbackError) Error() string
func (*RollbackError) Unwrap ¶
func (e *RollbackError) Unwrap() []error
Unwrap returns the list of errors for Go 1.20+ multi-error support This enables errors.Is() and errors.As() to work with all wrapped errors
Click to show internal directories.
Click to hide internal directories.