add (*Engine) SetConnMaxIdleTime
#2229
|
@ -254,6 +254,11 @@ func (engine *Engine) SetConnMaxLifetime(d time.Duration) {
|
||||||
engine.DB().SetConnMaxLifetime(d)
|
engine.DB().SetConnMaxLifetime(d)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SetConnMaxIdleTime sets the maximum amount of time a connection may be idle.
|
||||||
|
func (engine *Engine) SetConnMaxIdleTime(d time.Duration) {
|
||||||
|
engine.DB().SetConnMaxIdleTime(d)
|
||||||
|
}
|
||||||
|
|
||||||
// SetMaxOpenConns is only available for go 1.2+
|
// SetMaxOpenConns is only available for go 1.2+
|
||||||
func (engine *Engine) SetMaxOpenConns(conns int) {
|
func (engine *Engine) SetMaxOpenConns(conns int) {
|
||||||
engine.DB().SetMaxOpenConns(conns)
|
engine.DB().SetMaxOpenConns(conns)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user