Documentation ¶
Index ¶
- Constants
- func ErrIsDuplicateEntryError(err error) bool
- func ErrIsLockError(err error) bool
- type Conn
- func (c *Conn) Close(context.Context) error
- func (c *Conn) NewQuietSession(name string, timeout time.Duration) (*dbr.Session, error)
- func (c *Conn) NewSession(name string, timeout time.Duration) (*dbr.Session, error)
- func (c *Conn) NewSessionForEventReceiver(er health.EventReceiver) *dbr.Session
- func (c *Conn) SetConnMaxIdleTime(d time.Duration)
- func (c *Conn) SetConnMaxLifetime(d time.Duration)
- func (c *Conn) SetMaxIdleConns(n int)
- func (c *Conn) SetMaxOpenConns(n int)
Constants ¶
View Source
const ( DriverMysql = "mysql" DriverNone = "" )
View Source
const ( RemovedPassword = "[removed]" DeadlockDBErrorMessage = "Deadlock found when trying to get lock; try restarting transaction" TimeoutDBErrorMessage = "Lock wait timeout exceeded; try restarting transaction" )
Variables ¶
This section is empty.
Functions ¶
func ErrIsDuplicateEntryError ¶ added in v1.1.0
func ErrIsLockError ¶ added in v1.2.0
Types ¶
type Conn ¶ added in v1.1.0
type Conn struct {
// contains filtered or unexported fields
}
Conn is a wrapper around a dbr connection and a health stream
func (*Conn) NewQuietSession ¶ added in v1.4.1
func (*Conn) NewSession ¶ added in v1.1.0
func (*Conn) NewSessionForEventReceiver ¶ added in v1.1.0
func (c *Conn) NewSessionForEventReceiver(er health.EventReceiver) *dbr.Session
func (*Conn) SetConnMaxIdleTime ¶ added in v1.1.3
func (*Conn) SetConnMaxLifetime ¶ added in v1.1.3
func (*Conn) SetMaxIdleConns ¶ added in v1.1.3
func (*Conn) SetMaxOpenConns ¶ added in v1.1.3
Click to show internal directories.
Click to hide internal directories.