MCPcopy Index your code
hub / github.com/ddev/ddev / IsValidDatabaseVersion

Function IsValidDatabaseVersion

pkg/nodeps/values.go:161–171  ·  view source on GitHub ↗

IsValidDatabaseVersion checks if the version is valid for the provided database type

(dbType string, dbVersion string)

Source from the content-addressed store, hash-verified

159
160// IsValidDatabaseVersion checks if the version is valid for the provided database type
161func IsValidDatabaseVersion(dbType string, dbVersion string) bool {
162 switch dbType {
163 case MariaDB:
164 return IsValidMariaDBVersion(dbVersion)
165 case MySQL:
166 return IsValidMySQLVersion(dbVersion)
167 case Postgres:
168 return IsValidPostgresVersion(dbVersion)
169 }
170 return false
171}
172
173// GetValidDatabaseVersions returns a slice of valid versions with the format
174// mariadb:10.5/mysql:5.7/postgres:14

Callers 1

ValidateConfigMethod · 0.92

Calls 3

IsValidMariaDBVersionFunction · 0.85
IsValidMySQLVersionFunction · 0.85
IsValidPostgresVersionFunction · 0.85

Tested by

no test coverage detected