GetDBClientCommand returns the appropriate database client command (mysql or mariadb) based on the database type and version.
()
| 835 | // GetDBClientCommand returns the appropriate database client command (mysql or mariadb) |
| 836 | // based on the database type and version. |
| 837 | func (app *DdevApp) GetDBClientCommand() string { |
| 838 | // Use canonical mariadb client for MariaDB 10.5+ |
| 839 | if app.Database.Type == nodeps.MariaDB { |
| 840 | if isNewMariaDB, _ := util.SemverValidate(">= 10.5", app.Database.Version); isNewMariaDB { |
| 841 | return "mariadb" |
| 842 | } |
| 843 | } |
| 844 | return "mysql" |
| 845 | } |
| 846 | |
| 847 | // GetDBCompressionCommand returns the appropriate database compression command |
| 848 | // based on the database type and version. |