Package liquibase.database
Interface DatabaseConnection
- All Superinterfaces:
AutoCloseable
,PrioritizedService
- All Known Implementing Classes:
DerbyConnection
,HsqlConnection
,JdbcConnection
,MockDatabaseConnection
,OfflineConnection
,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 TypeMethodDescriptionvoid
void
close()
void
commit()
boolean
int
int
getURL()
boolean
isClosed()
void
open
(String url, Driver driverObject, Properties driverProperties) void
rollback()
void
setAutoCommit
(boolean autoCommit) default boolean
Default 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:
close
in 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() -
getConnectionUserName
String getConnectionUserName() -
isClosed
- Throws:
DatabaseException
-
attached
-