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

Function createTestingMySQLDB

go/database/testing.go:86–96  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

84}
85
86func createTestingMySQLDB() *DB {
87 db, e := OpenAndConnectDB(GetTestingMySQLURL())
88 assertNoErr(e)
89 _, e = db.Exec("CREATE DATABASE IF NOT EXISTS sqlflow_models;")
90 assertNoErr(e)
91 assertNoErr(testdata.Popularize(db.DB, testdata.IrisSQL))
92 assertNoErr(testdata.Popularize(db.DB, testdata.SanityCheckSQL))
93 assertNoErr(testdata.Popularize(db.DB, testdata.ChurnSQL))
94 assertNoErr(testdata.Popularize(db.DB, testdata.HousingSQL))
95 return db
96}
97
98// GetTestingHiveURL reutrns Hive connection URL
99func GetTestingHiveURL() string {

Callers 1

createTestingDBFunction · 0.85

Calls 4

PopularizeFunction · 0.92
OpenAndConnectDBFunction · 0.85
GetTestingMySQLURLFunction · 0.85
assertNoErrFunction · 0.85

Tested by

no test coverage detected