Package liquibase.change.core
Class LoadUpdateDataChange
java.lang.Object
liquibase.AbstractExtensibleObject
liquibase.plugin.AbstractPlugin
liquibase.change.AbstractChange
liquibase.change.AbstractTableChange
liquibase.change.core.LoadDataChange
liquibase.change.core.LoadUpdateDataChange
- All Implemented Interfaces:
Cloneable
,Change
,ChangeWithColumns<LoadDataColumnConfig>
,ExtensibleObject
,Plugin
,LiquibaseSerializable
-
Nested Class Summary
Nested classes/interfaces inherited from class liquibase.change.core.LoadDataChange
LoadDataChange.LOAD_DATA_TYPE, LoadDataChange.LoadDataRowConfig
Nested classes/interfaces inherited from interface liquibase.serializer.LiquibaseSerializable
LiquibaseSerializable.SerializationType
-
Field Summary
Fields inherited from class liquibase.change.core.LoadDataChange
BASE64_PATTERN, DEFAULT_COMMENT_PATTERN
Fields inherited from class liquibase.change.AbstractTableChange
catalogName, schemaName, tableName
Fields inherited from class liquibase.change.AbstractChange
NODENAME_COLUMN
Fields inherited from interface liquibase.change.Change
EMPTY_CHANGE, SHOULD_EXECUTE
Fields inherited from interface liquibase.serializer.LiquibaseSerializable
GENERIC_CHANGELOG_EXTENSION_NAMESPACE, GENERIC_SNAPSHOT_EXTENSION_NAMESPACE, STANDARD_CHANGELOG_NAMESPACE, STANDARD_SNAPSHOT_NAMESPACE
Fields inherited from interface liquibase.plugin.Plugin
PRIORITY_DATABASE, PRIORITY_DEFAULT, PRIORITY_NOT_APPLICABLE, PRIORITY_SPECIALIZED
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncheckStatus
(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 aInsertOrUpdateStatement
statement object for the specified tablegenerateRollbackStatements
(Database database) Implementation relies on value returned fromAbstractChange.createInverses()
.protected boolean
void
setOnlyUpdate
(Boolean onlyUpdate) Methods inherited from class liquibase.change.core.LoadDataChange
addColumn, columnConfigFromName, columnIdString, createStatementSet, generateCheckSum, generateRollbackStatementsVolatile, generateStatements, generateStatementsFromRows, generateStatementsVolatile, getColumnConfig, getColumns, getCommentLineStartsWith, getConfirmationMessage, getCSVReader, getEncoding, getFile, getQuotchar, getRelativeTo, getSeparator, getUsePreparedStatements, getValueToWrite, isNullValue, isRelativeToChangelogFile, setColumns, setCommentLineStartsWith, setSeparator, supports, supportsBatchUpdates, validate, validateColumn, validateColumns, warn
Methods inherited from class liquibase.change.AbstractTableChange
getCatalogName, getSchemaName
Methods inherited from class liquibase.change.AbstractChange
createAlternateParameterNames, createChangeMetaData, createChangeParameterMetadata, createDescriptionMetaData, createEmptyColumnConfig, createExampleValueMetaData, createInverses, createMustEqualExistingMetaData, createRequiredDatabasesMetaData, createSerializationTypeMetaData, createSinceMetaData, createSupportedDatabasesMetaData, customLoadLogic, equals, finishInitialization, getAffectedDatabaseObjects, getChangeSet, getDescription, getExcludedFieldFilters, getResourceAccessor, getSerializableFieldNamespace, getSerializableFields, getSerializableFieldType, getSerializableFieldValue, getSerializedObjectName, hashCode, isInvalidProperty, load, modify, serialize, serializeValue, setChangeSet, setResourceAccessor, shouldExecuteChange, supportsRollback, toString
Methods inherited from class liquibase.AbstractExtensibleObject
clone, describe, get, get, get, getAttributes, getFieldValue, getObjectMetaData, getValuePath, has, set
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface liquibase.ExtensibleObject
clone, describe, get, get, getAttributes, getObjectMetaData, getValuePath, has, set
-
Constructor Details
-
LoadUpdateDataChange
public LoadUpdateDataChange()
-
-
Method Details
-
hasPreparedStatementsImplemented
protected boolean hasPreparedStatementsImplemented()- Overrides:
hasPreparedStatementsImplemented
in classLoadDataChange
-
getTableName
- Overrides:
getTableName
in classLoadDataChange
-
getPrimaryKey
-
getOnlyUpdate
-
setOnlyUpdate
-
createStatement
Creates aInsertOrUpdateStatement
statement object for the specified table- Overrides:
createStatement
in classLoadDataChange
- Parameters:
catalogName
- name of the catalog where the table existsschemaName
- name of the schema where the table existstableName
- the table name to insert/update data- Returns:
- a specialised
InsertOrUpdateStatement
that will either insert or update rows in the target table
-
createPreparedStatement
protected ExecutablePreparedStatementBase createPreparedStatement(Database database, String catalogName, String schemaName, String tableName, List<LoadDataColumnConfig> columns, ChangeSet changeSet, ResourceAccessor resourceAccessor) - Overrides:
createPreparedStatement
in classLoadDataChange
-
generateRollbackStatements
public SqlStatement[] generateRollbackStatements(Database database) throws RollbackImpossibleException Description copied from class:AbstractChange
Implementation relies on value returned fromAbstractChange.createInverses()
.- Specified by:
generateRollbackStatements
in interfaceChange
- Overrides:
generateRollbackStatements
in classAbstractChange
- Throws:
RollbackImpossibleException
- if rollback is not supported for this change
-
getSerializedObjectNamespace
- Specified by:
getSerializedObjectNamespace
in interfaceLiquibaseSerializable
- Overrides:
getSerializedObjectNamespace
in classLoadDataChange
-
checkStatus
Description copied from interface:Change
Validate that this change executed successfully against the given database. This will check that the update completed at a high level plus check details of the change. For example, a change to add a column will check that the column exists plus data type, default values, etc.- Specified by:
checkStatus
in interfaceChange
- Overrides:
checkStatus
in classLoadDataChange
-