Package org.testcontainers.containers
Class JdbcDatabaseContainerProvider
java.lang.Object
org.testcontainers.containers.JdbcDatabaseContainerProvider
Base class for classes that can provide a JDBC container.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionInstantiate a newJdbcDatabaseContainerwithout any specified image tag.abstract JdbcDatabaseContainernewInstance(String tag) Instantiate a newJdbcDatabaseContainerwith specified image tag.newInstance(ConnectionUrl url) Instantiate a newJdbcDatabaseContainerusing information provided withConnectionUrl.protected JdbcDatabaseContainernewInstanceFromConnectionUrl(ConnectionUrl connectionUrl, String userParamName, String pwdParamName) abstract booleanTests if the specified database type is supported by this Container Provider.
-
Constructor Details
-
JdbcDatabaseContainerProvider
public JdbcDatabaseContainerProvider()
-
-
Method Details
-
supports
Tests if the specified database type is supported by this Container Provider. It should match to the base image name.- Parameters:
databaseType-String- Returns:
truewhen provider can handle this database type, elsefalse.
-
newInstance
Instantiate a newJdbcDatabaseContainerwithout any specified image tag. Subclasses should override this method if possible, to provide a default tag that is more stable thanlatest`.- Returns:
- Instance of
JdbcDatabaseContainer
-
newInstance
Instantiate a newJdbcDatabaseContainerwith specified image tag.- Parameters:
tag-- Returns:
- Instance of
JdbcDatabaseContainer
-
newInstance
Instantiate a newJdbcDatabaseContainerusing information provided withConnectionUrl.- Parameters:
url-ConnectionUrl- Returns:
- Instance of
JdbcDatabaseContainer
-
newInstanceFromConnectionUrl
protected JdbcDatabaseContainer newInstanceFromConnectionUrl(ConnectionUrl connectionUrl, String userParamName, String pwdParamName)
-