Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Unified Diff: golden/go/db/db.go

Issue 650253003: Added HTTP endpoints for Correctness counts (Closed) Base URL: https://skia.googlesource.com/buildbot@master
Patch Set: Fixed comments Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « golden/go/analysis/analysis.go ('k') | golden/go/expstorage/sqlexpstore.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: golden/go/db/db.go
diff --git a/golden/go/db/db.go b/golden/go/db/db.go
index 9f2f448342cbb1b90e0df8aaf43fd19e227daec5..28b6dcd6dcc09a5ff93d68c47babc9947e2f185d 100644
--- a/golden/go/db/db.go
+++ b/golden/go/db/db.go
@@ -13,17 +13,16 @@ const (
METADATA_KEY = "readwrite"
)
-// The migration steps for this DB.
+// MigrationSteps returns the migration (up and down) for the database.
func MigrationSteps() []database.MigrationStep {
return migrationSteps
}
-// Returns the DB connection string for running in production where a
-// metadata server is available. If 'local' is true it will always return
-// "" (empty string). When used with Init() this will cause it to use a
-// local SQLite database. If it's not local and the meta data server is
-// unreachable it will terminate.
-func GetDatabase(mySQLConnStr string, sqlitePath string, local bool) *database.DatabaseConfig {
+// GetConfig returns a DatabaseConfig instance for running in production if a
+// metadata server is available. If 'local' is true it will always
+// set the MySQL connection string to "" and thus use a local SQLite database
+// when used with database.NewVersionedDB.
+func GetConfig(mySQLConnStr string, sqlitePath string, local bool) *database.DatabaseConfig {
useMySQLConnStr := mySQLConnStr
// We are in the production environment, so we look up the password.
@@ -44,7 +43,7 @@ func GetDatabase(mySQLConnStr string, sqlitePath string, local bool) *database.D
}
}
-// Define the migration steps.
+// migrationSteps define the steps it takes to migrate the db between versions.
// Note: Only add to this list, once a step has landed in version control it
// must not be changed.
var migrationSteps = []database.MigrationStep{
« no previous file with comments | « golden/go/analysis/analysis.go ('k') | golden/go/expstorage/sqlexpstore.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698