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.
Constructor and Description |
---|
TConstraint() |
addAllMyTokensToTokenList, appendString, fastSetString, getColumnNo, getDummyTag, getEndToken, getGsqlparser, getLineNo, getNodeType, getStartToken, init, init, init, init, removeAllMyTokensFromTokenList, setDummyTag, setEndToken, setEndToken, setEndToken, setEndToken, setGsqlparser, setIncludingComment, setNodeType, setStartToken, setStartToken, setStartToken, setStartToken, setString, toScript, toString
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 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()
public void init(Object arg1)
TParseTreeNode
init
in class TParseTreeNode
arg1
- first argumentpublic 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)
Copyright © 2019. All rights reserved.