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 17
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 25
array
requireDatabaseServer(array $databaseConfig)
Ensure that the database server exists.
at line 34
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 42
string
getDatabaseVersion(array $databaseConfig)
Determines the version of the database server
at line 50
array
requireDatabaseVersion(array $databaseConfig)
Check database version is greater than the minimum supported
at line 59
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 69
array
requireDatabaseAlterPermissions(array $databaseConfig)
Ensure we have permissions to alter tables.