Skip to content

Commit

Permalink
driver: allow configuration of the driver name
Browse files Browse the repository at this point in the history
  • Loading branch information
dveeden committed Dec 6, 2024
1 parent 0126986 commit f88a1fb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion driver/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -389,13 +389,15 @@ func (r *rows) Next(dest []sqldriver.Value) error {
return nil
}

var driverName = "mysql"

func init() {
options["compress"] = CompressOption
options["collation"] = CollationOption
options["readTimeout"] = ReadTimeoutOption
options["writeTimeout"] = WriteTimeoutOption

sql.Register("mysql", driver{})
sql.Register(driverName, driver{})
}

// SetCustomTLSConfig sets a custom TLSConfig for the address (host:port) of the supplied DSN.
Expand Down

0 comments on commit f88a1fb

Please sign in to comment.