Versions in this module Expand all Collapse all v0 v0.0.1 May 3, 2024 Changes in this version + var ErrBusyBuffer = errors.New("busy buffer") + var ErrCleartextPassword = errors.New(...) + var ErrInvalidConn = errors.New("invalid connection") + var ErrMalformPkt = errors.New("malformed packet") + var ErrNativePassword = errors.New("this user requires mysql native password authentication.") + var ErrNoTLS = errors.New("TLS requested but server does not support TLS") + var ErrOldPassword = errors.New(...) + var ErrOldProtocol = errors.New("MySQL server does not support required protocol 41+") + var ErrPktSync = errors.New("commands out of sync. You can't run this command now") + var ErrPktSyncMul = errors.New("commands out of sync. Did you run multiple statements at once?") + var ErrPktTooLarge = errors.New(...) + var ErrUnknownPlugin = errors.New("this authentication plugin is not supported") + func DeregisterLocalFile(filePath string) + func DeregisterReaderHandler(name string) + func DeregisterServerPubKey(name string) + func DeregisterTLSConfig(key string) + func NewConnector(cfg *Config) (driver.Connector, error) + func RegisterDial(network string, dial DialFunc) + func RegisterDialContext(net string, dial DialContextFunc) + func RegisterLocalFile(filePath string) + func RegisterReaderHandler(name string, handler func() io.Reader) + func RegisterServerPubKey(name string, pubKey *rsa.PublicKey) + func RegisterTLSConfig(key string, config *tls.Config) error + func SetLogger(logger Logger) error + type Config struct + Addr string + AllowAllFiles bool + AllowCleartextPasswords bool + AllowFallbackToPlaintext bool + AllowNativePasswords bool + AllowOldPasswords bool + CheckConnLiveness bool + ClientFoundRows bool + Collation string + ColumnsWithAlias bool + DBName string + InterpolateParams bool + Loc *time.Location + MaxAllowedPacket int + MultiStatements bool + Net string + Params map[string]string + ParseTime bool + Passwd string + ReadTimeout time.Duration + RejectReadOnly bool + ServerPubKey string + TLS *tls.Config + TLSConfig string + Timeout time.Duration + User string + WriteTimeout time.Duration + func NewConfig() *Config + func ParseDSN(dsn string) (cfg *Config, err error) + func (cfg *Config) Clone() *Config + func (cfg *Config) FormatDSN() string + type DialContextFunc func(ctx context.Context, addr string) (net.Conn, error) + type DialFunc func(addr string) (net.Conn, error) + type Logger interface + Print func(v ...interface{}) + type MySQLDriver struct + func (d MySQLDriver) Open(dsn string) (driver.Conn, error) + func (d MySQLDriver) OpenConnector(dsn string) (driver.Connector, error) + type MySQLError struct + Message string + Number uint16 + SQLState [5]byte + func (me *MySQLError) Error() string + func (me *MySQLError) Is(err error) bool + type NullTime sql.NullTime + func (nt *NullTime) Scan(value interface{}) (err error) + func (nt NullTime) Value() (driver.Value, error)