Class MsConstraintCheck

All Implemented Interfaces:
IConstraint, ISearchPath, IStatement, ISubElement, IHashable

public class MsConstraintCheck extends MsConstraint
Represents a Microsoft SQL CHECK constraint that validates column values against a boolean expression.
  • Constructor Details

    • MsConstraintCheck

      public MsConstraintCheck(String name)
      Creates a new Microsoft SQL CHECK constraint.
      Parameters:
      name - the constraint name
  • Method Details

    • getDefinition

      public String getDefinition()
      Description copied from interface: IConstraint
      Gets the SQL definition of this constraint.
      Returns:
      the constraint definition
    • setNotForRepl

      public void setNotForRepl(boolean isNotForRepl)
    • setExpression

      public void setExpression(String expression)
    • computeHash

      public void computeHash(Hasher hasher)
      Description copied from interface: IHashable
      Computes the hash of the implementing object using the provided hasher. The implementation should call appropriate put methods on the hasher for all fields that should contribute to the hash value.
      Specified by:
      computeHash in interface IHashable
      Overrides:
      computeHash in class MsConstraint
      Parameters:
      hasher - the hasher instance to use for hash computation
    • compare

      public boolean compare(IStatement obj)
      Description copied from class: AbstractStatement
      This method does not account for nested child PgStatements. Shallow version of AbstractStatement.equals(Object)
      Specified by:
      compare in interface IStatement
      Overrides:
      compare in class MsConstraint