@groovy.transform.CompileStatic class GroovyPrecondition extends liquibase.precondition.AbstractPrecondition
Custom Groovy-based precondition.
Modifiers | Name | Description |
---|---|---|
class |
GroovyPrecondition.1 |
Fields inherited from class | Fields |
---|---|
class liquibase.precondition.AbstractPrecondition |
STANDARD_CHANGELOG_NAMESPACE, GENERIC_CHANGELOG_EXTENSION_NAMESPACE, STANDARD_SNAPSHOT_NAMESPACE, GENERIC_SNAPSHOT_EXTENSION_NAMESPACE |
Type | Name and description |
---|---|
liquibase.changelog.DatabaseChangeLog |
changeLog |
liquibase.changelog.ChangeSet |
changeSet |
groovy.lang.Closure |
checkClosure |
org.springframework.context.ApplicationContext |
ctx |
liquibase.database.Database |
database |
java.lang.String |
name |
liquibase.resource.ResourceAccessor |
resourceAccessor |
java.lang.String |
serializedObjectNamespace |
groovy.sql.Sql |
sql |
Constructor and description |
---|
GroovyPrecondition() |
Type Params | Return Type | Name and description |
---|---|---|
|
void |
check(liquibase.database.Database database, liquibase.changelog.DatabaseChangeLog changeLog, liquibase.changelog.ChangeSet changeSet, liquibase.changelog.visitor.ChangeExecListener changeExecListener) |
|
liquibase.snapshot.DatabaseSnapshot |
createDatabaseSnapshot(java.lang.String schemaName) Called from the check closure. |
|
void |
fail(java.lang.String message) Called from the check closure as a shortcut to throw a PreconditionFailedException . |
|
grails.core.GrailsApplication |
getApplication() Called from the change or rollback closure. |
|
grails.config.Config |
getConfig() Called from the change or rollback closure. |
|
java.sql.Connection |
getConnection() Called from the change or rollback closure. |
|
liquibase.database.DatabaseConnection |
getDatabaseConnection() Called from the change or rollback closure. |
|
groovy.sql.Sql |
getSql() Called from the change or rollback closure. |
|
void |
load(liquibase.parser.core.ParsedNode parsedNode, liquibase.resource.ResourceAccessor resourceAccessor) |
|
liquibase.exception.ValidationErrors |
validate(liquibase.database.Database database) |
|
liquibase.exception.Warnings |
warn(liquibase.database.Database database) |
Methods inherited from class | Name |
---|---|
class liquibase.precondition.AbstractPrecondition |
liquibase.precondition.AbstractPrecondition#getSerializedObjectName(), liquibase.precondition.AbstractPrecondition#getSerializableFieldValue(java.lang.String), liquibase.precondition.AbstractPrecondition#getSerializableFieldType(java.lang.String), liquibase.precondition.AbstractPrecondition#getSerializableFieldNamespace(java.lang.String), liquibase.precondition.AbstractPrecondition#getSerializableFields(), liquibase.precondition.AbstractPrecondition#load(liquibase.parser.core.ParsedNode, liquibase.resource.ResourceAccessor), liquibase.precondition.AbstractPrecondition#serialize(), liquibase.precondition.AbstractPrecondition#wait(long, int), liquibase.precondition.AbstractPrecondition#wait(), liquibase.precondition.AbstractPrecondition#wait(long), liquibase.precondition.AbstractPrecondition#equals(java.lang.Object), liquibase.precondition.AbstractPrecondition#toString(), liquibase.precondition.AbstractPrecondition#hashCode(), liquibase.precondition.AbstractPrecondition#getClass(), liquibase.precondition.AbstractPrecondition#notify(), liquibase.precondition.AbstractPrecondition#notifyAll(), liquibase.precondition.AbstractPrecondition#getSerializedObjectNamespace(), liquibase.precondition.AbstractPrecondition#getName(), liquibase.precondition.AbstractPrecondition#validate(liquibase.database.Database), liquibase.precondition.AbstractPrecondition#check(liquibase.database.Database, liquibase.changelog.DatabaseChangeLog, liquibase.changelog.ChangeSet, liquibase.changelog.visitor.ChangeExecListener), liquibase.precondition.AbstractPrecondition#warn(liquibase.database.Database) |
Called from the check closure.
schemaName
- the schema name Called from the check closure as a shortcut to throw a PreconditionFailedException
.
message
- the failure messageCalled from the change or rollback closure. Shortcut for the current application.
Called from the change or rollback closure. Shortcut for the current config.
Called from the change or rollback closure. Shortcut to get the real database connection.
null
if the database isn't set yetCalled from the change or rollback closure. Shortcut to get the (wrapper) database connection.
null
if the database isn't set yet Called from the change or rollback closure. Creates a Sql
instance from the current connection.
Groovy Documentation