public class LoadUpdateDataChange extends LoadDataChange
LoadDataChange.LOAD_DATA_TYPE
LiquibaseSerializable.SerializationType
BASE64_PATTERN, DEFAULT_COMMENT_PATTERN
catalogName, schemaName, tableName
NODENAME_COLUMN
GENERIC_CHANGELOG_EXTENSION_NAMESPACE, GENERIC_SNAPSHOT_EXTENSION_NAMESPACE, STANDARD_CHANGELOG_NAMESPACE, STANDARD_SNAPSHOT_NAMESPACE
PRIORITY_DEFAULT, PRIORITY_NOT_APPLICABLE, PRIORITY_SPECIALIZED
Constructor and Description |
---|
LoadUpdateDataChange() |
Modifier and Type | Method and Description |
---|---|
ChangeStatus |
checkStatus(Database database)
Validate that this change executed successfully against the given database.
|
protected ExecutablePreparedStatementBase |
createPreparedStatement(Database database,
String catalogName,
String schemaName,
String tableName,
List<LoadDataColumnConfig> columns,
ChangeSet changeSet,
ResourceAccessor resourceAccessor) |
protected InsertStatement |
createStatement(String catalogName,
String schemaName,
String tableName)
Creates a
InsertOrUpdateStatement statement object for the specified table |
SqlStatement[] |
generateRollbackStatements(Database database)
Implementation relies on value returned from
AbstractChange.createInverses() . |
Boolean |
getOnlyUpdate() |
String |
getPrimaryKey() |
String |
getSerializedObjectNamespace() |
String |
getTableName() |
protected boolean |
hasPreparedStatementsImplemented() |
void |
setOnlyUpdate(Boolean onlyUpdate) |
void |
setPrimaryKey(String primaryKey) |
addColumn, columnConfigFromName, columnIdString, createStatementSet, generateCheckSum, generateRollbackStatementsVolatile, generateStatements, generateStatementsVolatile, getColumnConfig, getColumns, getCommentLineStartsWith, getConfirmationMessage, getCSVReader, getEncoding, getFile, getQuotchar, getRelativeTo, getSeparator, getUsePreparedStatements, getValueToWrite, isRelativeToChangelogFile, setColumns, setCommentLineStartsWith, setEncoding, setFile, setQuotchar, setRelativeToChangelogFile, setSeparator, setUsePreparedStatements, supports, validate, validateColumn, validateColumns, warn
getCatalogName, getSchemaName, setCatalogName, setSchemaName, setTableName
createChangeMetaData, createChangeParameterMetadata, createDescriptionMetaData, createEmptyColumnConfig, createExampleValueMetaData, createInverses, createMustEqualExistingMetaData, createRequiredDatabasesMetaData, createSerializationTypeMetaData, createSinceMetaData, createSupportedDatabasesMetaData, customLoadLogic, finishInitialization, getAffectedDatabaseObjects, getChangeSet, getDescription, getResourceAccessor, getSerializableFieldNamespace, getSerializableFields, getSerializableFieldType, getSerializableFieldValue, getSerializedObjectName, isInvalidProperty, load, serialize, serializeValue, setChangeSet, setResourceAccessor, supportsRollback, toString
clone, describe, equals, get, get, get, getAttributes, getFieldValue, getObjectMetaData, getValuePath, has, hashCode, set
finalize, getClass, notify, notifyAll, wait, wait, wait
clone, describe, get, get, getAttributes, getObjectMetaData, getValuePath, has, set
protected boolean hasPreparedStatementsImplemented()
hasPreparedStatementsImplemented
in class LoadDataChange
public String getTableName()
getTableName
in class LoadDataChange
public void setPrimaryKey(String primaryKey)
public String getPrimaryKey()
public Boolean getOnlyUpdate()
public void setOnlyUpdate(Boolean onlyUpdate)
protected InsertStatement createStatement(String catalogName, String schemaName, String tableName)
InsertOrUpdateStatement
statement object for the specified tablecreateStatement
in class LoadDataChange
catalogName
- name of the catalog where the table existsschemaName
- name of the schema where the table existstableName
- the table name to insert/update dataInsertOrUpdateStatement
that will either insert or update rows in the target tableprotected ExecutablePreparedStatementBase createPreparedStatement(Database database, String catalogName, String schemaName, String tableName, List<LoadDataColumnConfig> columns, ChangeSet changeSet, ResourceAccessor resourceAccessor)
createPreparedStatement
in class LoadDataChange
public SqlStatement[] generateRollbackStatements(Database database) throws RollbackImpossibleException
AbstractChange
AbstractChange.createInverses()
.generateRollbackStatements
in interface Change
generateRollbackStatements
in class AbstractChange
RollbackImpossibleException
- if rollback is not supported for this changepublic String getSerializedObjectNamespace()
getSerializedObjectNamespace
in interface LiquibaseSerializable
getSerializedObjectNamespace
in class LoadDataChange
public ChangeStatus checkStatus(Database database)
Change
checkStatus
in interface Change
checkStatus
in class LoadDataChange
Copyright © 2022 Liquibase.org. All rights reserved.