Package org.pgcodekeeper.core.schema.ms
Class MsConstraintCheck
java.lang.Object
org.pgcodekeeper.core.schema.PgStatement
org.pgcodekeeper.core.schema.AbstractConstraint
org.pgcodekeeper.core.schema.ms.MsConstraint
org.pgcodekeeper.core.schema.ms.MsConstraintCheck
- All Implemented Interfaces:
IHashable,IConstraint,ISearchPath,IStatement
Represents a Microsoft SQL CHECK constraint that validates column values against a boolean expression.
-
Field Summary
Fields inherited from class org.pgcodekeeper.core.schema.PgStatement
GO -
Constructor Summary
ConstructorsConstructorDescriptionMsConstraintCheck(String name) Creates a new Microsoft SQL CHECK constraint. -
Method Summary
Modifier and TypeMethodDescriptionbooleancompare(PgStatement obj) This method does not account for nested child PgStatements.voidcomputeHash(Hasher hasher) Computes the hash of the implementing object using the provided hasher.Gets the SQL definition of this constraint.voidsetExpression(String expression) voidsetNotForRepl(boolean isNotForRepl) Methods inherited from class org.pgcodekeeper.core.schema.ms.MsConstraint
appendAlterSQL, getCreationSQL, getDbType, getDropSQL, setDisabled, shallowCopyMethods inherited from class org.pgcodekeeper.core.schema.AbstractConstraint
containsColumn, getColumns, getContainingSchema, getLocation, getStatementType, getTableName, isNotValid, isSubElement, setNotValidMethods inherited from class org.pgcodekeeper.core.schema.PgStatement
addAllDeps, addDep, addPrivilege, appendAlterComments, appendComments, appendOwnerSQL, canDrop, canDropBeforeCreate, checkComments, clearPrivileges, compareChildren, deepCopy, equals, getAuthor, getBareName, getChildren, getComment, getDeps, getDescendants, getDropSQL, getLibName, getName, getObjectState, getObjectState, getOwner, getParent, getPrivileges, getQualifiedName, getSQL, getTwin, getTypeName, hasChildren, hashCode, isLib, isOwned, setAuthor, setComment, setLibName, setLocation, setOwner, setParent, toStringMethods inherited from interface org.pgcodekeeper.core.schema.IConstraint
isPrimaryKeyMethods inherited from interface org.pgcodekeeper.core.schema.ISearchPath
getDatabase, getSchemaNameMethods inherited from interface org.pgcodekeeper.core.schema.IStatement
getBareName, getComment, getName, getParent, getQualifiedName
-
Constructor Details
-
MsConstraintCheck
Creates a new Microsoft SQL CHECK constraint.- Parameters:
name- the constraint name
-
-
Method Details
-
setNotForRepl
public void setNotForRepl(boolean isNotForRepl) -
setExpression
-
getDefinition
Description copied from interface:IConstraintGets the SQL definition of this constraint.- Returns:
- the constraint definition
-
compare
Description copied from class:PgStatementThis method does not account for nested child PgStatements. Shallow version ofPgStatement.equals(Object)- Overrides:
comparein classMsConstraint
-
computeHash
Description copied from interface:IHashableComputes the hash of the implementing object using the provided hasher. The implementation should call appropriateputmethods on the hasher for all fields that should contribute to the hash value.- Specified by:
computeHashin interfaceIHashable- Overrides:
computeHashin classMsConstraint- Parameters:
hasher- the hasher instance to use for hash computation
-