public class TConstraint extends TParseTreeNode
Oracle Database lets you create six types of constraints and lets you declare them in two ways.
getColumnList()
to result columns of this unique key.
getColumnList()
to result columns of this primary key.
getColumnList()
to result columns of this foreign key.
getCheckCondition()
to return this condition.
dbvendor, doubleLinkedTokenListToString, nodeActionAppend, nodeActionInsert, nodeActionRemove, nodeActionUnknown, nodeActionUpdate, nodeActionUpdateText, nodeChangeEndToken, nodeChangeStartToken
Constructor and Description |
---|
TConstraint() |
addAllMyTokensToTokenList, addToTokenChain, appendNewNode, calculateTokenCount, doAppendNewNode, fastSetString, getAnchorNode, getColumnNo, getCommentAfterNode, getCommentBeforeNode, getCompactString, getDummyTag, getEndToken, getEvaluateDatatype, getEvalValue, getGsqlparser, getLineNo, getLocation, getMd5, getNodeStatus, getNodeType, getParentObjectName, getPlainText, getStartToken, getTokenCount, hasNext, init, init, init, insertAfterAToken, insertNewNodeBeforeMe, isChanged, isTokensInChain, next, refreshAllNodesTokenCount, remove, removeAllMyTokensFromTokenList, removeTokens, removeTokensBetweenNodes, removeTokensBetweenToken, replaceWithNewNode, resetIterator, setAnchorNode, setChanged, setDummyTag, setEndToken, setEndToken, setEndToken, setEndToken, setEndToken, setEndTokenDirectly, setEvaluateDatatype, setEvalValue, setGsqlparser, setIncludingComment, setLocation, setNewSubNode, setNodeStatus, setNodeType, setParent, setPlainText, setStartToken, setStartToken, setStartToken, setStartToken, setStartTokenDirectly, setString, setString2, subNodeInNode, toScript, toString, toString2
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEachRemaining
public TConstraint()
public void setColumnGeneratedClause(TColumnGeneratedClause columnGeneratedClause)
public TColumnGeneratedClause getColumnGeneratedClause()
public void setOnFilegroup(TDummy onFilegroup)
public TDummy getOnFilegroup()
public void setWithIndexoption(TDummy withIndexoption)
public TDummy getWithIndexoption()
public TObjectName getIndexName()
getConstraint_type()
is EConstraintType.table_index
or index name of column index when getConstraint_type()
is EConstraintType.column_index
public void setCommentObject(TObjectName commentObject)
public void setForObjectName(TObjectName forObjectName)
public TObjectName getForObjectName()
public TObjectName getCommentObject()
public void setKeyActions(TPTNodeList<TKeyAction> keyActions)
public TPTNodeList<TKeyAction> getKeyActions()
public void setConstraintLevel(int constraintLevel)
public int getConstraintLevel()
public void setDefaultExpression(TExpression defaultExpression)
public TExpression getDefaultExpression()
public void setConstraintName(TObjectName constraintName)
public TObjectName getConstraintName()
public void setConstraint_type(EConstraintType constraint_type)
public EConstraintType getConstraint_type()
EConstraintType.notnull
,
EConstraintType.unique
,
EConstraintType.primary_key
,
EConstraintType.foreign_key
,
EConstraintType.check
,
EConstraintType.reference
,
EConstraintType.default_value
public void setClustered(boolean clustered)
public void setClusteredToken(TSourceToken clusteredToken)
public boolean isClustered()
public boolean isNonClustered()
public void setNonClustered(boolean nonClustered)
public void setAutomaticProperties(TPTNodeList<TAutomaticProperty> automaticProperties)
public TPTNodeList<TAutomaticProperty> getAutomaticProperties()
public TExpression getCheckCondition()
public TPTNodeList<TColumnWithSortOrder> getColumnList()
public void setColumnList(TPTNodeList<TColumnWithSortOrder> columnList)
public TPTNodeList<TIndexColName> getIndexCols()
getColumnList()
instead.public void init(Object arg1)
TParseTreeNode
init
in class TParseTreeNode
arg1
- first argumentpublic TObjectName getIndexColumnName()
public void init(Object arg1, Object arg2, Object arg3)
init
in class TParseTreeNode
public void init(Object arg1, Object arg2)
init
in class TParseTreeNode
public void setReferencedColumnList(TObjectNameList referencedColumnList)
public TObjectNameList getReferencedColumnList()
public void setReferencedObject(TObjectName referencedObject)
public TObjectName getReferencedObject()
public void setIncrement(TExpression increment)
public void setSeed(TExpression seed)
public TExpression getIncrement()
public TExpression getSeed()
public void accept(TParseTreeVisitor v)
TParseTreeNode
accept
in interface Visitable
accept
in class TParseTreeNode
v
- visitor is a descendant class of TParseTreeVisitor
public void acceptChildren(TParseTreeVisitor v)
TParseTreeNode
acceptChildren
in interface Visitable
acceptChildren
in class TParseTreeNode
v
- visitor is a descendant class of TParseTreeVisitor
public void doParse(TCustomSqlStatement psql, ESqlClause plocation)
TParseTreeNode
doParse
in class TParseTreeNode
psql
- SQL statement this node belongs toplocation
- SQL clause this node belongs topublic void setCheckCondition(TExpression checkCondition)
public void setIndexCols(TPTNodeList<TIndexColName> indexCols)