Interface JdbcDrivers
-
- All Known Implementing Classes:
JdbcDriversProxy,TeamCityJdbcDrivers
public interface JdbcDrivers
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DriverfindDefaultDriver(DatabaseType dbType)Provides with the default driver for the specified database type.DriverfindDriver(String connectionString)Looks for a situable driver (one that accepts the given url, seeDriver.acceptsURL(String)).ClassLoadergetClassLoader()DrivergetDriver(String connectionString)Looks for a situable driver (one that accepts the given url, seeDriver.acceptsURL(String)).DrivergetDriver(String connectionString, String className)FilegetDriverLocation(Driver driver)Returns location of jar file containing specified JDBC driver.voidunregisterAll()
-
-
-
Method Detail
-
getClassLoader
@NotNull ClassLoader getClassLoader()
-
findDefaultDriver
@Nullable Driver findDefaultDriver(@NotNull DatabaseType dbType)
Provides with the default driver for the specified database type.- Parameters:
dbType- type of the database.- Returns:
- the driver, or null if no applicable drivers.
-
findDriver
@Nullable Driver findDriver(@NotNull String connectionString) throws NoSuitableJdbcDrivers
Looks for a situable driver (one that accepts the given url, seeDriver.acceptsURL(String)).- Parameters:
connectionString- url to check for.- Returns:
- found suitable driver, or null if not found.
- Throws:
NoSuitableJdbcDrivers
-
getDriver
@NotNull Driver getDriver(@NotNull String connectionString) throws NoSuitableJdbcDrivers
Looks for a situable driver (one that accepts the given url, seeDriver.acceptsURL(String)). Or raises an exception if no suitable drivers.- Parameters:
connectionString- url to check for.- Returns:
- found suitable driver.
- Throws:
NoSuitableJdbcDrivers- when no suitable JDBC drivers found.
-
getDriver
@NotNull Driver getDriver(@NotNull String connectionString, @NotNull String className) throws NoSuitableJdbcDrivers
- Throws:
NoSuitableJdbcDrivers
-
unregisterAll
void unregisterAll()
-
-