Class AbstractJdbcConnector
java.lang.Object
org.pgcodekeeper.core.database.base.jdbc.AbstractJdbcConnector
- All Implemented Interfaces:
IJdbcConnector
- Direct Known Subclasses:
ChJdbcConnector,MsJdbcConnector,PgJdbcConnector
Abstract base class for JDBC database connectors.
Provides common functionality for establishing database connections.
-
Method Summary
Modifier and TypeMethodDescriptionCreates a new database connection using the parameters specified in the constructor.getUrl()Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.pgcodekeeper.core.database.api.jdbc.IJdbcConnector
getBatchDelimiter
-
Method Details
-
getConnection
Description copied from interface:IJdbcConnectorCreates a new database connection using the parameters specified in the constructor. The caller is responsible for closing the connection.- Specified by:
getConnectionin interfaceIJdbcConnector- Returns:
- new database connection
- Throws:
IOException- if the driver is not found or a database access error occurs
-
getUrl
- Specified by:
getUrlin interfaceIJdbcConnector- Returns:
- connection string
-
getDbName
- Specified by:
getDbNamein interfaceIJdbcConnector- Returns:
- database name extracted from the connection URL
-