Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDuplicateKeyError ¶
NewDuplicateKeyError creates a new DuplicateKeyError
func NewDuplicateKeyErrorWithValue ¶
NewDuplicateKeyErrorWithValue creates a new DuplicateKeyError with value Be careful with sensitive data like emails
func WrapErrorIfDuplciateConstraint ¶
ErrorIsDuplicateConstraint
Types ¶
type DuplicateKeyError ¶
type DuplicateKeyError struct {
Field string // The field that caused the constraint violation
Value string // The value that was duplicated (optional, might be sensitive)
// contains filtered or unexported fields
}
DuplicateKeyError represents a database constraint violation error
func (*DuplicateKeyError) Error ¶
func (e *DuplicateKeyError) Error() string
func (*DuplicateKeyError) GetField ¶
func (e *DuplicateKeyError) GetField() string
GetField returns the field that caused the violation
func (*DuplicateKeyError) Unwrap ¶
func (e *DuplicateKeyError) Unwrap() error
Unwrap returns the underlying error for error chain support
Click to show internal directories.
Click to hide internal directories.