-
Notifications
You must be signed in to change notification settings - Fork 27
Description
In the Java implementation, there is a JdbcDatabaseContainer abstract class(it should be an interface from the design view) and an R2dbcDatabaseContainer interface to unite the common properties when connecting Rdbms with JDBC or R2dbc driver.
In this PHP implementation, common properties such as databaseName, username, password, etc., are varied in different database containers.
For example, MySQL:
$container->withMariaDBDatabase('foo');
$container->withMariaDBUser('bar', 'baz');and Postgres:
->withPostgresUser('test')
->withPostgresDatabase('foo')These properties' naming looks a little tedious, we know the database type when creating the container, so why add database type as the prefix of these properties?
It is better to use some interface to unite these properties for Rdbms.
- DatabaseName
- Username
- Password
- TestQueryString
interface RdbmsContainer{
}Or PdoDatabaseContainer and DoctrineDatabaseContainer to add driver-specific properties, as described in #23.