DatabaseConfigurationHelper
interface DatabaseConfigurationHelper
Interface for database helper classes.
Methods
Ensure that the database function for connectivity is available.
Ensure that the database server exists.
Ensure a database connection is possible using credentials provided.
Determines the version of the database server
Check database version is greater than the minimum supported
Ensure that the database connection is able to use an existing database, or be able to create one if it doesn't exist.
Ensure we have permissions to alter tables.
Details
at line 18
boolean
requireDatabaseFunctions(array $databaseConfig)
Ensure that the database function for connectivity is available.
If it is, we assume the PHP module for this database has been setup correctly.
at line 26
array
requireDatabaseServer(array $databaseConfig)
Ensure that the database server exists.
at line 35
array
requireDatabaseConnection(array $databaseConfig)
Ensure a database connection is possible using credentials provided.
The established connection resource is returned with the results as well.
at line 43
string
getDatabaseVersion(array $databaseConfig)
Determines the version of the database server
at line 51
array
requireDatabaseVersion(array $databaseConfig)
Check database version is greater than the minimum supported
at line 60
array
requireDatabaseOrCreatePermissions(array $databaseConfig)
Ensure that the database connection is able to use an existing database, or be able to create one if it doesn't exist.
at line 70
array
requireDatabaseAlterPermissions(array $databaseConfig)
Ensure we have permissions to alter tables.