public class CheckConstraintClause extends ConstraintClause
"[CONSTRAINT <name> ] CHECK (<condition>)"
Note that if no conditions are added, then this object will not output anything.
ConstraintClause.CheckTime, ConstraintClause.Type
_checkTime, _columns, _name, _type
ALL_SYMBOL, NULL_VALUE, QUESTION_MARK
Modifier | Constructor and Description |
---|---|
|
CheckConstraintClause(CheckConstraint checkConstraint) |
protected |
CheckConstraintClause(Object name,
Condition condition) |
Modifier and Type | Method and Description |
---|---|
CheckConstraintClause |
addCondition(Condition newCondition)
Adds a condition to the condition clause for the CHECK constraint (AND'd
with any other conditions).
|
void |
appendTo(AppendableExt app)
Appends this object to the given AppendableExt.
|
protected void |
collectSchemaObjects(ValidationContext vContext)
Used during Query.validate() calls to collect the dbschema objects
referenced in a query.
|
ComboCondition |
getCondition()
Allows access to the AND ComboCondition of the condition clause to
facilitate common condition building code.
|
addColumns, addCustomColumns, checkCondition, checkCondition, foreignKey, foreignKey, from, notNull, notNull, postAppendTo, preAppendTo, primaryKey, primaryKey, setCheckTime, unique, unique
collectSchemaObjects, doValidate, toString
toString, toString
public CheckConstraintClause(CheckConstraint checkConstraint)
public ComboCondition getCondition()
public CheckConstraintClause addCondition(Condition newCondition)
For convenience purposes, the CheckConstraint generates it's own ComboCondition allowing multiple conditions to be AND'd together. To OR conditions or perform other logic, the ComboCondition must be built and added to the CheckConstraint.
protected void collectSchemaObjects(ValidationContext vContext)
SqlObject
collectSchemaObjects
in class ConstraintClause
vContext
- handle to the current validation contextpublic void appendTo(AppendableExt app) throws IOException
Appendee
appendTo
in interface Appendee
appendTo
in class ConstraintClause
app
- the AppendableExt to which this class should append itselfIOException
- if the append failsCopyright © 2006–2021 OpenHMS. All rights reserved.