MCPcopy Create free account
hub / github.com/sql-machine-learning/sqlflow / GetTestingMySQLConfig

Function GetTestingMySQLConfig

go/database/testing.go:71–79  ·  view source on GitHub ↗

GetTestingMySQLConfig construct a MySQL config

()

Source from the content-addressed store, hash-verified

69
70// GetTestingMySQLConfig construct a MySQL config
71func GetTestingMySQLConfig() *mysql.Config {
72 return &mysql.Config{
73 User: test.GetEnv("SQLFLOW_TEST_DB_MYSQL_USER", "root"),
74 Passwd: test.GetEnv("SQLFLOW_TEST_DB_MYSQL_PASSWD", "root"),
75 Net: test.GetEnv("SQLFLOW_TEST_DB_MYSQL_NET", "tcp"),
76 Addr: test.GetEnv("SQLFLOW_TEST_DB_MYSQL_ADDR", "127.0.0.1:3306"),
77 AllowNativePasswords: true,
78 }
79}
80
81// GetTestingMySQLURL returns MySQL connection URL
82func GetTestingMySQLURL() string {

Callers 2

TestDatabaseParseURLFunction · 0.85
GetTestingMySQLURLFunction · 0.85

Calls 1

GetEnvFunction · 0.92

Tested by 1

TestDatabaseParseURLFunction · 0.68