Package liquibase.database
Class OfflineConnection
java.lang.Object
liquibase.database.OfflineConnection
- All Implemented Interfaces:
AutoCloseable
,DatabaseConnection
,PrioritizedService
-
Field Summary
Fields inherited from interface liquibase.servicelocator.PrioritizedService
COMPARATOR, PRIORITY_DATABASE, PRIORITY_DEFAULT
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
close()
void
commit()
protected ChangeLogHistoryService
createChangeLogHistoryService
(Database database) boolean
int
int
int
boolean
getSnapshot
(DatabaseObject[] examples) Returns a copy of the current simulated content of the database, filtered by the given array.getURL()
boolean
boolean
isClosed()
boolean
isCorrectDatabaseImplementation
(Database database) void
open
(String url, Driver driverObject, Properties driverProperties) void
rollback()
void
setAutoCommit
(boolean autoCommit) void
setCaseSensitive
(boolean caseSensitive) void
setConnectionUserName
(String connectionUserName) void
setDatabaseMajorVersion
(int databaseMajorVersion) void
setDatabaseMinorVersion
(int databaseMinorVersion) void
setProductName
(String productName) void
setProductVersion
(String productVersion) void
setSendsStringParametersAsUnicode
(boolean sendsStringParametersAsUnicode) void
setSnapshot
(DatabaseSnapshot snapshot) For debugging purposes: sets a DatabaseSnapshot object for this connection.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface liquibase.database.DatabaseConnection
supports
-
Constructor Details
-
OfflineConnection
public OfflineConnection() -
OfflineConnection
-
-
Method Details
-
getPriority
public int getPriority()- Specified by:
getPriority
in interfacePrioritizedService
-
isCorrectDatabaseImplementation
-
open
public void open(String url, Driver driverObject, Properties driverProperties) throws DatabaseException - Specified by:
open
in interfaceDatabaseConnection
- Throws:
DatabaseException
-
attached
- Specified by:
attached
in interfaceDatabaseConnection
-
createChangeLogHistoryService
-
getSnapshot
Returns a copy of the current simulated content of the database, filtered by the given array.- Parameters:
examples
- the list of objects to clone- Returns:
- a new DatabaseSnapshot object containing all objects matching examples. If none are found, an empty DatabaseSnapshot is returned.
-
setSnapshot
For debugging purposes: sets a DatabaseSnapshot object for this connection. Effectively, this simulates the content of the database in this OfflineConnection.- Parameters:
snapshot
- the snapshot with the simulated database content
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceDatabaseConnection
- Throws:
DatabaseException
-
commit
- Specified by:
commit
in interfaceDatabaseConnection
- Throws:
DatabaseException
-
getAutoCommit
- Specified by:
getAutoCommit
in interfaceDatabaseConnection
- Throws:
DatabaseException
-
setAutoCommit
- Specified by:
setAutoCommit
in interfaceDatabaseConnection
- Throws:
DatabaseException
-
getCatalog
- Specified by:
getCatalog
in interfaceDatabaseConnection
- Throws:
DatabaseException
-
getSchema
-
nativeSQL
- Specified by:
nativeSQL
in interfaceDatabaseConnection
- Throws:
DatabaseException
-
rollback
- Specified by:
rollback
in interfaceDatabaseConnection
- Throws:
DatabaseException
-
getDatabaseProductName
- Specified by:
getDatabaseProductName
in interfaceDatabaseConnection
- Throws:
DatabaseException
-
getDatabaseProductVersion
- Specified by:
getDatabaseProductVersion
in interfaceDatabaseConnection
- Throws:
DatabaseException
-
getDatabaseMajorVersion
- Specified by:
getDatabaseMajorVersion
in interfaceDatabaseConnection
- Throws:
DatabaseException
-
setDatabaseMajorVersion
public void setDatabaseMajorVersion(int databaseMajorVersion) -
setProductVersion
-
setProductName
-
getDatabaseMinorVersion
- Specified by:
getDatabaseMinorVersion
in interfaceDatabaseConnection
- Throws:
DatabaseException
-
setDatabaseMinorVersion
public void setDatabaseMinorVersion(int databaseMinorVersion) -
getURL
- Specified by:
getURL
in interfaceDatabaseConnection
-
getConnectionUserName
- Specified by:
getConnectionUserName
in interfaceDatabaseConnection
-
setConnectionUserName
-
isClosed
- Specified by:
isClosed
in interfaceDatabaseConnection
- Throws:
DatabaseException
-
getSendsStringParametersAsUnicode
public boolean getSendsStringParametersAsUnicode() -
setSendsStringParametersAsUnicode
public void setSendsStringParametersAsUnicode(boolean sendsStringParametersAsUnicode) -
isCaseSensitive
public boolean isCaseSensitive() -
setCaseSensitive
public void setCaseSensitive(boolean caseSensitive)
-