add disable version check func

This commit is contained in:
tyler 2022-11-15 13:01:59 +08:00
parent 3acabdaf26
commit 572f8b1040
1 changed files with 6 additions and 0 deletions

View File

@ -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
}