public class OfflineConnection extends Object implements DatabaseConnection
COMPARATOR, PRIORITY_DATABASE, PRIORITY_DEFAULT
Constructor and Description |
---|
OfflineConnection() |
OfflineConnection(String url,
ResourceAccessor resourceAccessor) |
Modifier and Type | Method and Description |
---|---|
void |
attached(Database database) |
void |
close() |
void |
commit() |
protected ChangeLogHistoryService |
createChangeLogHistoryService(Database database) |
boolean |
getAutoCommit() |
String |
getCatalog() |
String |
getConnectionUserName() |
int |
getDatabaseMajorVersion() |
int |
getDatabaseMinorVersion() |
String |
getDatabaseProductName() |
String |
getDatabaseProductVersion() |
int |
getPriority() |
String |
getSchema() |
boolean |
getSendsStringParametersAsUnicode() |
DatabaseSnapshot |
getSnapshot(DatabaseObject[] examples)
Returns a copy of the current simulated content of the database, filtered by the given
array.
|
String |
getURL() |
boolean |
isCaseSensitive() |
boolean |
isClosed() |
boolean |
isCorrectDatabaseImplementation(Database database) |
String |
nativeSQL(String sql) |
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
supports
public OfflineConnection()
public OfflineConnection(String url, ResourceAccessor resourceAccessor)
public int getPriority()
getPriority
in interface PrioritizedService
public boolean isCorrectDatabaseImplementation(Database database)
public void open(String url, Driver driverObject, Properties driverProperties) throws DatabaseException
open
in interface DatabaseConnection
DatabaseException
public void attached(Database database)
attached
in interface DatabaseConnection
protected ChangeLogHistoryService createChangeLogHistoryService(Database database)
public DatabaseSnapshot getSnapshot(DatabaseObject[] examples)
examples
- the list of objects to clonepublic void setSnapshot(DatabaseSnapshot snapshot)
snapshot
- the snapshot with the simulated database contentpublic void close() throws DatabaseException
close
in interface AutoCloseable
close
in interface DatabaseConnection
DatabaseException
public void commit() throws DatabaseException
commit
in interface DatabaseConnection
DatabaseException
public boolean getAutoCommit() throws DatabaseException
getAutoCommit
in interface DatabaseConnection
DatabaseException
public void setAutoCommit(boolean autoCommit) throws DatabaseException
setAutoCommit
in interface DatabaseConnection
DatabaseException
public String getCatalog() throws DatabaseException
getCatalog
in interface DatabaseConnection
DatabaseException
public String getSchema()
public String nativeSQL(String sql) throws DatabaseException
nativeSQL
in interface DatabaseConnection
DatabaseException
public void rollback() throws DatabaseException
rollback
in interface DatabaseConnection
DatabaseException
public String getDatabaseProductName() throws DatabaseException
getDatabaseProductName
in interface DatabaseConnection
DatabaseException
public String getDatabaseProductVersion() throws DatabaseException
getDatabaseProductVersion
in interface DatabaseConnection
DatabaseException
public int getDatabaseMajorVersion() throws DatabaseException
getDatabaseMajorVersion
in interface DatabaseConnection
DatabaseException
public void setDatabaseMajorVersion(int databaseMajorVersion)
public void setProductVersion(String productVersion)
public void setProductName(String productName)
public int getDatabaseMinorVersion() throws DatabaseException
getDatabaseMinorVersion
in interface DatabaseConnection
DatabaseException
public void setDatabaseMinorVersion(int databaseMinorVersion)
public String getURL()
getURL
in interface DatabaseConnection
public String getConnectionUserName()
getConnectionUserName
in interface DatabaseConnection
public void setConnectionUserName(String connectionUserName)
public boolean isClosed() throws DatabaseException
isClosed
in interface DatabaseConnection
DatabaseException
public boolean getSendsStringParametersAsUnicode()
public void setSendsStringParametersAsUnicode(boolean sendsStringParametersAsUnicode)
public boolean isCaseSensitive()
public void setCaseSensitive(boolean caseSensitive)
Copyright © 2023 Liquibase.org. All rights reserved.