Top Description Fields Methods
liquibase.database

public Interface DatabaseConnection

extends PrioritizedService, AutoCloseable
Known Direct Implementers
liquibase.database.MockDatabaseConnection, liquibase.database.OfflineConnection, liquibase.database.jvm.JdbcConnection
Imports
java.sql.Driver, java.util.Properties, liquibase.exception.DatabaseException, liquibase.servicelocator.PrioritizedService

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

Inherited from liquibase.servicelocator.PrioritizedService:
COMPARATORPRIORITY_DATABASEPRIORITY_DEFAULT

Method Summary

Modifier and TypeMethod and Description
public void
attached(Database database)

public void
close()

Redeclares java.lang.AutoCloseable.close.

Closes this resource, relinquishing any underlying resources.

public void
public boolean
public String
public String
public int
public int
public String
public String
public String
public boolean
public String
public void
open(String url, Driver driverObject, Properties driverProperties)

public void
public void
setAutoCommit(boolean autoCommit)

public default boolean

Returns:

true if URL is supported
supports
(String
the url connection string
url
)

Default implementation for compatibility with a URL.

Inherited from liquibase.servicelocator.PrioritizedService:
getPriority

Method Detail

attachedback to summary
public void attached(Database database)
closeback to summary
public void close() throws DatabaseException

Redeclares java.lang.AutoCloseable.close.

Doc from java.lang.AutoCloseable.close.

Closes this resource, relinquishing any underlying resources. This method is invoked automatically on objects managed by the try-with-resources statement.

Annotations
@Override
commitback to summary
public void commit() throws DatabaseException
getAutoCommitback to summary
public boolean getAutoCommit() throws DatabaseException
getCatalogback to summary
public String getCatalog() throws DatabaseException
getConnectionUserNameback to summary
public String getConnectionUserName()
getDatabaseMajorVersionback to summary
public int getDatabaseMajorVersion() throws DatabaseException
getDatabaseMinorVersionback to summary
public int getDatabaseMinorVersion() throws DatabaseException
getDatabaseProductNameback to summary
public String getDatabaseProductName() throws DatabaseException
getDatabaseProductVersionback to summary
public String getDatabaseProductVersion() throws DatabaseException
getURLback to summary
public String getURL()
isClosedback to summary
public boolean isClosed() throws DatabaseException
nativeSQLback to summary
public String nativeSQL(String sql) throws DatabaseException
openback to summary
public void open(String url, Driver driverObject, Properties driverProperties) throws DatabaseException
rollbackback to summary
public void rollback() throws DatabaseException
setAutoCommitback to summary
public void setAutoCommit(boolean autoCommit) throws DatabaseException
supportsback to summary
public default boolean supports(String url)

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:String

the url connection string

Returns:boolean

true if URL is supported