Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CodeStrings ¶
func CodeStrings() []string
CodeStrings returns a slice of all String values of the enum
Types ¶
type Code ¶
type Code uint32
Code is a sql driver independent error code, used to determine the type of the error.
const ( // OK is returned when there is no error. OK Code = 0 // NotFound is returned when a row is not found. NotFound Code = 1 // UniqueViolation is returned when a unique constraint is violated. UniqueViolation Code = 2 // TableNotFound is returned when a table is not found. TableNotFound Code = 3 // DataException is returned when a data exception is detected. DataException Code = 4 // ConcurrentUpdate is returned when a concurrent update is detected. ConcurrentUpdate Code = 5 // AuthenticationFailed is returned when authentication failed. AuthenticationFailed Code = 6 // InternalError is returned when an internal error occurred. InternalError Code = 7 // ForeignKeyViolation is returned when a foreign key constraint is violated. ForeignKeyViolation Code = 8 // ConstraintViolation is returned when a not null, check or exclusion constraint is violated. // It is not used for unique or foreign key constraints. ConstraintViolation Code = 9 // InvalidInputSyntax is returned when an invalid input syntax is detected. InvalidInputSyntax Code = 10 // PermissionDenied is returned when authorization failed. PermissionDenied Code = 11 // OutOfDisk is returned when the disk is full. OutOfDisk Code = 12 // OutOfMemory is returned when the memory is full. OutOfMemory Code = 13 // TooManyConnections is returned when the maximum number of connections is reached. TooManyConnections Code = 14 // TxDone is returned when the transaction is already closed. TxDone Code = 15 // Timeout is returned when the query timed out. Timeout Code = 16 // Unknown is returned when the error is unknown. Unknown Code = 17 )
func CodeString ¶
CodeString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func (Code) IsACode ¶
IsACode returns "true" if the value is listed in the enum definition. "false" otherwise
func (Code) MarshalText ¶
MarshalText implements the encoding.TextMarshaler interface for Code
func (*Code) UnmarshalText ¶
UnmarshalText implements the encoding.TextUnmarshaler interface for Code
Click to show internal directories.
Click to hide internal directories.