Class MsConstraintCheck

All Implemented Interfaces:
IHashable, IConstraint, ISearchPath, IStatement

public final 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

    • setNotForRepl

      public void setNotForRepl(boolean isNotForRepl)
    • setExpression

      public void setExpression(String expression)
    • getDefinition

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

      public boolean compare(PgStatement obj)
      Description copied from class: PgStatement
      This method does not account for nested child PgStatements. Shallow version of PgStatement.equals(Object)
      Overrides:
      compare in class MsConstraint
    • 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