add disable version check func (#2197)
Co-authored-by: tyler <tylerthail@gmail.com> Reviewed-on: https://gitea.com/xorm/xorm/pulls/2197 Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: tylerthail2019 <tylerthail2019@noreply.gitea.io> Co-committed-by: tylerthail2019 <tylerthail2019@noreply.gitea.io>
This commit is contained in:
parent
3acabdaf26
commit
71a5939c65
|
@ -794,3 +794,9 @@ func (session *Session) PingContext(ctx context.Context) error {
|
||||||
session.engine.logger.Infof("PING DATABASE %v", session.engine.DriverName())
|
session.engine.logger.Infof("PING DATABASE %v", session.engine.DriverName())
|
||||||
return session.DB().PingContext(ctx)
|
return session.DB().PingContext(ctx)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// disable version check
|
||||||
|
func (session *Session) NoVersionCheck() *Session {
|
||||||
|
session.statement.CheckVersion = false
|
||||||
|
return session
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue