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

Function GetTestingDBSingleton

go/database/testing.go:37–45  ·  view source on GitHub ↗

GetTestingDBSingleton returns the testing DB singleton.

()

Source from the content-addressed store, hash-verified

35
36// GetTestingDBSingleton returns the testing DB singleton.
37func GetTestingDBSingleton() *DB {
38 muTestingDBSingleton.Lock()
39 defer muTestingDBSingleton.Unlock()
40
41 if testingDBSingleton == nil {
42 testingDBSingleton = createTestingDB()
43 }
44 return testingDBSingleton
45}
46
47// createTestingDB opens a database with parameters specified in the
48// environment variables with prefix name "SQLFLOW_TEST_DB". By

Callers 15

TestSQLFSWriteAndReadFunction · 0.92
TestSQLFSNewHiveWriterFunction · 0.92
TestSQLFSWriterCreateFunction · 0.92
TestSQLFSNewSQLWriterFunction · 0.92
TestGeneratePredictStmtFunction · 0.92
TestFeatureDerivationFunction · 0.92

Calls 1

createTestingDBFunction · 0.85

Tested by 15

TestSQLFSWriteAndReadFunction · 0.74
TestSQLFSNewHiveWriterFunction · 0.74
TestSQLFSWriterCreateFunction · 0.74
TestSQLFSNewSQLWriterFunction · 0.74
TestGeneratePredictStmtFunction · 0.74
TestFeatureDerivationFunction · 0.74