Package liquibase.database
Interface DatabaseConnection
- All Superinterfaces:
AutoCloseable,PrioritizedService
- All Known Implementing Classes:
DerbyConnection,HsqlConnection,JdbcConnection,MockDatabaseConnection,OfflineConnection,SnowflakeJdbcConnection,SybaseASAConnection,SybaseConnection
A liquibase abstraction over the normal Connection that is available in
java.sql. This interface allows wrappers and aspects over the basic
connection.
-
Field Summary
Fields inherited from interface liquibase.servicelocator.PrioritizedService
COMPARATOR, PRIORITY_DATABASE, PRIORITY_DEFAULT -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidclose()voidcommit()booleanintintdefault ConnectiongetURL()default StringDefault implementation for the URL that is displayedbooleanisClosed()voidopen(String url, Driver driverObject, Properties driverProperties) voidrollback()voidsetAutoCommit(boolean autoCommit) default booleanDefault implementation for compatibility with a URL.Methods inherited from interface liquibase.servicelocator.PrioritizedService
getPriority
-
Method Details
-
open
- Throws:
DatabaseException
-
supports
Default implementation for compatibility with a URL. Method is used when a Connection is opened based on an identified driverObject from url. Can be overridden in DatabaseConnection implementations with a higher priority to check against a given url.- Parameters:
url- the url connection string- Returns:
- true if URL is supported
-
close
- Specified by:
closein interfaceAutoCloseable- Throws:
DatabaseException
-
commit
- Throws:
DatabaseException
-
getAutoCommit
- Throws:
DatabaseException
-
getCatalog
- Throws:
DatabaseException
-
nativeSQL
- Throws:
DatabaseException
-
rollback
- Throws:
DatabaseException
-
setAutoCommit
- Throws:
DatabaseException
-
getDatabaseProductName
- Throws:
DatabaseException
-
getDatabaseProductVersion
- Throws:
DatabaseException
-
getDatabaseMajorVersion
- Throws:
DatabaseException
-
getDatabaseMinorVersion
- Throws:
DatabaseException
-
getURL
String getURL() -
getVisibleUrl
Default implementation for the URL that is displayed- Returns:
- String
-
getConnectionUserName
String getConnectionUserName() -
isClosed
- Throws:
DatabaseException
-
attached
-
getUnderlyingConnection
-