public class TOnConflictClause extends TParseTreeNode
PostgreSQL syntax:
INSERT INTO table_name ...
ON CONFLICT [ conflict_target ] conflict_action
conflict_target:
( { index_column_name | ( index_expression ) } [, ...] ) [ WHERE index_predicate ]
| ON CONSTRAINT constraint_name
conflict_action:
DO NOTHING
| DO UPDATE SET { column_name = expression } [, ...] [ WHERE condition ]
dbvendor, doubleLinkedTokenListToString, nodeActionAppend, nodeActionInsert, nodeActionRemove, nodeActionUnknown, nodeActionUpdate, nodeActionUpdateText, nodeChangeEndToken, nodeChangeStartToken| Constructor and Description |
|---|
TOnConflictClause() |
| Modifier and Type | Method and Description |
|---|---|
void |
acceptChildren(TParseTreeVisitor v)
Accept a visitor to iterate this class and sub-nodes of this class
|
void |
doParse(TCustomSqlStatement psql,
ESqlClause clauseType)
Parses the ON CONFLICT clause within the context of the parent statement.
|
EOnConflictActionType |
getActionType()
Returns the conflict action type: DO NOTHING or DO UPDATE.
|
TObjectName |
getConstraintName()
Returns the constraint name when ON CONSTRAINT syntax is used.
|
TOrderByItemList |
getIndexColumns()
Returns the list of index column names or expressions that form the conflict target.
|
TWhereClause |
getIndexWhereClause()
Returns the WHERE clause for the partial unique index predicate on the conflict target.
|
TResultColumnList |
getUpdateSetClause()
Returns the SET clause assignments for the DO UPDATE action.
|
TWhereClause |
getUpdateWhereClause()
Returns the WHERE clause for the DO UPDATE action.
|
void |
setActionType(EOnConflictActionType actionType) |
void |
setConflictTarget(TDummy dummy)
Sets the conflict target from a TDummy node produced by the grammar.
|
void |
setConstraintName(TObjectName constraintName) |
void |
setIndexColumns(TOrderByItemList indexColumns) |
void |
setIndexWhereClause(TWhereClause indexWhereClause) |
void |
setUpdateSetClause(TResultColumnList updateSetClause) |
void |
setUpdateWhereClause(TWhereClause updateWhereClause) |
accept, 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, init, init, init, init, 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, toString2clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEachRemainingpublic TOnConflictClause()
public EOnConflictActionType getActionType()
public void setActionType(EOnConflictActionType actionType)
public TOrderByItemList getIndexColumns()
public void setIndexColumns(TOrderByItemList indexColumns)
public TObjectName getConstraintName()
public void setConstraintName(TObjectName constraintName)
public TWhereClause getIndexWhereClause()
public void setIndexWhereClause(TWhereClause indexWhereClause)
public TResultColumnList getUpdateSetClause()
public void setUpdateSetClause(TResultColumnList updateSetClause)
public TWhereClause getUpdateWhereClause()
public void setUpdateWhereClause(TWhereClause updateWhereClause)
public void setConflictTarget(TDummy dummy)
public void doParse(TCustomSqlStatement psql, ESqlClause clauseType)
doParse in class TParseTreeNodepsql - SQL statement this node belongs toclauseType - SQL clause this node belongs topublic void acceptChildren(TParseTreeVisitor v)
TParseTreeNodeacceptChildren in interface VisitableacceptChildren in class TParseTreeNodev - visitor is a descendant class of TParseTreeVisitor