MCPcopy
hub / github.com/go-sql-driver/mysql / NewConfig

Function NewConfig

dsn.go:92–101  ·  dsn.go::NewConfig

NewConfig creates a new Config and sets default values.

()

Source from the content-addressed store, hash-verified

90
91// NewConfig creates a new Config and sets default values.
92func NewConfig() *Config {
93 cfg := &Config{
94 Loc: time.UTC,
95 MaxAllowedPacket: defaultMaxAllowedPacket,
96 Logger: defaultLogger,
97 AllowNativePasswords: true,
98 CheckConnLiveness: true,
99 }
100 return cfg
101}
102
103// Apply applies the given options to the Config object.
104func (c *Config) Apply(opts ...Option) error {

Callers 11

ParseDSNFunction · 0.85
newRWMockConnFunction · 0.85
TestReadPacketSingleByteFunction · 0.85
TestReadPacketSplitFunction · 0.85
TestReadPacketFailFunction · 0.85
TestPingErrInvalidConnFunction · 0.85
TestParamsAreSortedFunction · 0.85
configForTestsFunction · 0.85

Calls

no outgoing calls

Tested by 10

newRWMockConnFunction · 0.68
TestReadPacketSingleByteFunction · 0.68
TestReadPacketSplitFunction · 0.68
TestReadPacketFailFunction · 0.68
TestPingErrInvalidConnFunction · 0.68
TestParamsAreSortedFunction · 0.68
configForTestsFunction · 0.68