Skip to content

Commit 3326742

Browse files
authored
Implement driver.Validator interface (go-sql-driver#1174)
1 parent 7b629a9 commit 3326742

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Diff for: connection.go

+6
Original file line numberDiff line numberDiff line change
@@ -642,3 +642,9 @@ func (mc *mysqlConn) ResetSession(ctx context.Context) error {
642642
mc.reset = true
643643
return nil
644644
}
645+
646+
// IsValid implements driver.Validator interface
647+
// (From Go 1.15)
648+
func (mc *mysqlConn) IsValid() bool {
649+
return !mc.closed.IsSet()
650+
}

0 commit comments

Comments
 (0)