Package liquibase.change.core
Class SQLFileChange
java.lang.Object
liquibase.AbstractExtensibleObject
liquibase.plugin.AbstractPlugin
liquibase.change.AbstractChange
liquibase.change.AbstractSQLChange
liquibase.change.core.SQLFileChange
- All Implemented Interfaces:
- Cloneable,- Change,- DbmsTargetedChange,- ExtensibleObject,- Plugin,- LiquibaseSerializable
Represents a Change for custom SQL stored in a File.
- 
Nested Class SummaryNested classes/interfaces inherited from class liquibase.change.AbstractSQLChangeAbstractSQLChange.NormalizingStreamNested classes/interfaces inherited from interface liquibase.serializer.LiquibaseSerializableLiquibaseSerializable.SerializationType
- 
Field SummaryFields inherited from class liquibase.change.AbstractSQLChangeencodingFields inherited from class liquibase.change.AbstractChangeNODENAME_COLUMNFields inherited from interface liquibase.change.ChangeEMPTY_CHANGE, SHOULD_EXECUTEFields inherited from interface liquibase.serializer.LiquibaseSerializableGENERIC_CHANGELOG_EXTENSION_NAMESPACE, GENERIC_SNAPSHOT_EXTENSION_NAMESPACE, STANDARD_CHANGELOG_NAMESPACE, STANDARD_SNAPSHOT_NAMESPACEFields inherited from interface liquibase.plugin.PluginPRIORITY_DATABASE, PRIORITY_DEFAULT, PRIORITY_NOT_APPLICABLE, PRIORITY_SPECIALIZED
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptiondescribe()Output a full description of this object.voidDefault implementation is a no-opCalculates the checksum based on the contained SQL.booleangenerateRollbackStatementsVolatile(Database database) Implementation delegates logic to theSqlGenerator.generateRollbackStatementsIsVolatile(Database)method on theSqlStatementobjects returned byChange.generateStatements(liquibase.database.Database)If no or null SqlStatements are returned by generateRollbackStatements then this method returns false.booleangenerateStatementsVolatile(Database database) Implementation delegates logic to theSqlGenerator.generateStatementsIsVolatile(Database)method on theSqlStatementobjects returned byChange.generateStatements(liquibase.database.Database).Confirmation message to be displayed after the change is executed.The encoding of the file containing SQL statementsgetPath()getSql()Return the raw SQL managed by this ChangegetSql(boolean doExpandExpressions) voidsetDoExpandExpressionsInGenerateChecksum(Boolean doExpandExpressionsInGenerateChecksum) voidsetEncoding(String encoding) voidSets the file name but setUp must be called for the change to have impact.voidsetRelativeToChangelogFile(Boolean relativeToChangelogFile) voidSet the raw SQL managed by this Change.Implementation checks the ChangeParameterMetaData for declared required fields and also delegates logic to theSqlGenerator.validate(liquibase.statement.SqlStatement, liquibase.database.Database, liquibase.sqlgenerator.SqlGeneratorChain)method on theSqlStatementobjects returned byChange.generateStatements(liquibase.database.Database).Methods inherited from class liquibase.change.AbstractSQLChangecheckStatus, generateStatements, getDbms, getEndDelimiter, isIgnoreOriginalSplitStatements, isSplitStatements, isSplitStatementsSet, isStripComments, isStripCommentsUsedDefaultValue, normalizeLineEndings, setDbms, setEndDelimiter, setIgnoreOriginalSplitStatements, setOriginalSplitStatements, setSplitStatements, setStripComments, setStripComments, supports, warnMethods inherited from class liquibase.change.AbstractChangecreateAlternateParameterNames, createChangeMetaData, createChangeParameterMetadata, createDescriptionMetaData, createEmptyColumnConfig, createExampleValueMetaData, createInverses, createMustEqualExistingMetaData, createRequiredDatabasesMetaData, createSerializationTypeMetaData, createSinceMetaData, createSupportedDatabasesMetaData, customLoadLogic, equals, generateRollbackStatements, getAffectedDatabaseObjects, getChangeSet, getDescription, getExcludedFieldFilters, getResourceAccessor, getSerializableFieldNamespace, getSerializableFields, getSerializableFieldType, getSerializableFieldValue, getSerializedObjectName, hashCode, isInvalidProperty, load, modify, serialize, serializeValue, setChangeSet, setResourceAccessor, shouldExecuteChange, supportsRollback, toStringMethods inherited from class liquibase.AbstractExtensibleObjectclone, get, get, get, getAttributes, getFieldValue, getObjectMetaData, getValuePath, has, setMethods inherited from class java.lang.Objectfinalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface liquibase.change.ChangeshouldRunOnOsMethods inherited from interface liquibase.ExtensibleObjectclone, get, get, getAttributes, getObjectMetaData, getValuePath, has, set
- 
Constructor Details- 
SQLFileChangepublic SQLFileChange()
 
- 
- 
Method Details- 
generateStatementsVolatileDescription copied from class:AbstractChangeImplementation delegates logic to theSqlGenerator.generateStatementsIsVolatile(Database)method on theSqlStatementobjects returned byChange.generateStatements(liquibase.database.Database). If zero or null SqlStatements are returned by generateStatements then this method returns false.- Specified by:
- generateStatementsVolatilein interface- Change
- Overrides:
- generateStatementsVolatilein class- AbstractSQLChange
 
- 
generateRollbackStatementsVolatileDescription copied from class:AbstractChangeImplementation delegates logic to theSqlGenerator.generateRollbackStatementsIsVolatile(Database)method on theSqlStatementobjects returned byChange.generateStatements(liquibase.database.Database)If no or null SqlStatements are returned by generateRollbackStatements then this method returns false.- Specified by:
- generateRollbackStatementsVolatilein interface- Change
- Overrides:
- generateRollbackStatementsVolatilein class- AbstractSQLChange
 
- 
getPath
- 
setPathSets the file name but setUp must be called for the change to have impact.- Parameters:
- fileName- The file to use
 
- 
getEncodingThe encoding of the file containing SQL statements- Returns:
- the encoding
 
- 
setEncoding- Parameters:
- encoding- the encoding to set
 
- 
isRelativeToChangelogFile
- 
setRelativeToChangelogFile
- 
setDoExpandExpressionsInGenerateChecksum
- 
finishInitializationDescription copied from class:AbstractChangeDefault implementation is a no-op- Specified by:
- finishInitializationin interface- Change
- Overrides:
- finishInitializationin class- AbstractChange
- Throws:
- SetupException
 
- 
openSqlStream- Overrides:
- openSqlStreamin class- AbstractSQLChange
- Throws:
- IOException
 
- 
validateDescription copied from class:AbstractChangeImplementation checks the ChangeParameterMetaData for declared required fields and also delegates logic to theSqlGenerator.validate(liquibase.statement.SqlStatement, liquibase.database.Database, liquibase.sqlgenerator.SqlGeneratorChain)method on theSqlStatementobjects returned byChange.generateStatements(liquibase.database.Database). If no or null SqlStatements are returned by generateStatements then this method returns no errors. If there are no parameters than this method returns no errors- Specified by:
- validatein interface- Change
- Overrides:
- validatein class- AbstractSQLChange
 
- 
getConfirmationMessageDescription copied from interface:ChangeConfirmation message to be displayed after the change is executed. Should include relevant configuration settings to make it as helpful as possible. This method may be called outside the changelog execution process, such as in documentation generation.
- 
getSqlDescription copied from class:AbstractSQLChangeReturn the raw SQL managed by this Change- Overrides:
- getSqlin class- AbstractSQLChange
 
- 
getSql
- 
setSqlDescription copied from class:AbstractSQLChangeSet the raw SQL managed by this Change. The passed sql is trimmed and set to null if an empty string is passed.- Overrides:
- setSqlin class- AbstractSQLChange
 
- 
getSerializedObjectNamespace- Specified by:
- getSerializedObjectNamespacein interface- LiquibaseSerializable
- Overrides:
- getSerializedObjectNamespacein class- AbstractChange
 
- 
describeDescription copied from interface:ExtensibleObjectOutput a full description of this object. Should include all attributes and values.- Specified by:
- describein interface- ExtensibleObject
- Overrides:
- describein class- AbstractExtensibleObject
 
- 
generateCheckSumDescription copied from class:AbstractSQLChangeCalculates the checksum based on the contained SQL.- Specified by:
- generateCheckSumin interface- Change
- Overrides:
- generateCheckSumin class- AbstractSQLChange
- See Also:
 
 
-