Class PgColumnExistsPrecondition

java.lang.Object
liquibase.serializer.AbstractLiquibaseSerializable
liquibase.precondition.AbstractPrecondition
ch.tocco.nice2.dbrefactoring.impl.liquibase.precondition.AbstractPgPrecondition<Boolean>
ch.tocco.nice2.dbrefactoring.impl.liquibase.precondition.PgColumnExistsPrecondition
All Implemented Interfaces:
liquibase.precondition.Precondition, liquibase.serializer.LiquibaseSerializable

public class PgColumnExistsPrecondition extends AbstractPgPrecondition<Boolean>
An efficient implementation of the 'columnExists' precondition for PostgreSQL that uses a query instead of database metadata.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface liquibase.serializer.LiquibaseSerializable

    liquibase.serializer.LiquibaseSerializable.SerializationType
  • Field Summary

    Fields inherited from interface liquibase.serializer.LiquibaseSerializable

    GENERIC_CHANGELOG_EXTENSION_NAMESPACE, GENERIC_SNAPSHOT_EXTENSION_NAMESPACE, STANDARD_CHANGELOG_NAMESPACE, STANDARD_SNAPSHOT_NAMESPACE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected String
     
    protected void
    evaluateResult(Boolean result, liquibase.changelog.DatabaseChangeLog changeLog)
     
     
     
     
     
     
    void
    setColumnName(String columnName)
     
    void
    setSchemaName(String schemaName)
     
    void
    setTableName(String tableName)
     
    protected void
     

    Methods inherited from class ch.tocco.nice2.dbrefactoring.impl.liquibase.precondition.AbstractPgPrecondition

    check, validate, warn

    Methods inherited from class liquibase.precondition.AbstractPrecondition

    getSerializedObjectName

    Methods inherited from class liquibase.serializer.AbstractLiquibaseSerializable

    convertEscaped, getSerializableFieldDataTypeClass, getSerializableFieldDataTypeClassParameters, getSerializableFieldNamespace, getSerializableFields, getSerializableFieldType, getSerializableFieldValue, load, serialize, serializeValue, setSerializableFieldValue, shouldAutoLoad

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface liquibase.serializer.LiquibaseSerializable

    getSerializableFieldNamespace, getSerializableFields, getSerializableFieldType, getSerializableFieldValue, serialize

    Methods inherited from interface liquibase.precondition.Precondition

    load
  • Constructor Details

    • PgColumnExistsPrecondition

      public PgColumnExistsPrecondition()
  • Method Details

    • getName

      public String getName()
    • evaluateResult

      protected void evaluateResult(Boolean result, liquibase.changelog.DatabaseChangeLog changeLog) throws liquibase.exception.PreconditionFailedException
      Specified by:
      evaluateResult in class AbstractPgPrecondition<Boolean>
      Throws:
      liquibase.exception.PreconditionFailedException
    • validate

      protected void validate() throws liquibase.exception.PreconditionErrorException
      Specified by:
      validate in class AbstractPgPrecondition<Boolean>
      Throws:
      liquibase.exception.PreconditionErrorException
    • buildQuery

      protected String buildQuery()
      Specified by:
      buildQuery in class AbstractPgPrecondition<Boolean>
    • getSerializedObjectNamespace

      public String getSerializedObjectNamespace()
    • getSchemaName

      public String getSchemaName()
    • setSchemaName

      public void setSchemaName(String schemaName)
    • getTableName

      public String getTableName()
    • setTableName

      public void setTableName(String tableName)
    • getColumnName

      public String getColumnName()
    • setColumnName

      public void setColumnName(String columnName)