Documentation ¶
Overview ¶
Package mysqldb contains database-related functions that are specific to mysql.
Index ¶
Constants ¶
View Source
const MaxRowsReturned int = 1000000000
Variables ¶
This section is empty.
Functions ¶
func ErrorContains ¶
ErrorContains checks whether an error contains a needle.
func IsMysqlError ¶
func IsMysqlError(err error, mysqlErrorNumber MysqlErrorNumber) bool
IsMysqlError checks whether an error is a Mysql error of a certain type.
Types ¶
type MysqlErrorNumber ¶
type MysqlErrorNumber uint16
MysqlErrorNumber represents the code number of a mysql error.
const ( // DuplicateEntryError represents a mysql Duplicate Entry Error. DuplicateEntryError MysqlErrorNumber = 1062 // LockWaitTimeoutExceededError represents a mysql Lock Wait Timeout Exceeded Error. LockWaitTimeoutExceededError MysqlErrorNumber = 1205 // DeadlockError represents the mysql error "Deadlock found when trying to get lock; try restarting transaction". DeadlockError MysqlErrorNumber = 1213 // ForeignConstraintError represents a mysql Foreign Constraint Error. ForeignConstraintError MysqlErrorNumber = 1452 )
Click to show internal directories.
Click to hide internal directories.