You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
dorm/vendor/github.com/denisenkom/go-mssqldb/mssql_go118pre.go

18 lines
525 B

// +build !go1.18
package mssql
import (
"database/sql/driver"
)
// newRetryableError returns an error that allows the database/sql package
// to automatically retry the failed query. Versions of Go lower than 1.18
// compare directly to the sentinel error driver.ErrBadConn to determine
// whether or not a failed query can be retried. Therefore, we replace the
// actual error with driver.ErrBadConn, enabling retry but losing the error
// details.
func newRetryableError(err error) error {
return driver.ErrBadConn
}