public class TMergeWhenClause extends TParseTreeNode
merge into .... [when matched [and search_conditions ] then update set {col_name = expression} | delete] [when not matched [and search_conditions ] then insert [(column_list)] values (value_list)]
call method getCondition()
to return search_condition if any.
call method getUpdateClause()
, getDeleteClause()
and getInsertClause()
separately to get related update clause,
delete clause and insert clause.
TMergeUpdateClause
,
TMergeDeleteClause
,
TMergeInsertClause
Modifier and Type | Field and Description |
---|---|
static int |
matched |
static int |
matched_with_condition |
static int |
not_matched |
static int |
not_matched_by_source |
static int |
not_matched_by_source_with_condition |
static int |
not_matched_by_target |
static int |
not_matched_by_target_with_condition |
static int |
not_matched_with_condition |
Constructor and Description |
---|
TMergeWhenClause() |
Modifier and Type | Method and Description |
---|---|
void |
accept(TParseTreeVisitor v)
Accept a visitor
|
void |
acceptChildren(TParseTreeVisitor v)
Accept a visitor to iterate this class and sub-nodes of this class
|
void |
doParse(TCustomSqlStatement psql,
ESqlClause plocation)
Analyze the sub-nodes inside this node.
|
TExpression |
getCondition() |
TMergeDeleteClause |
getDeleteClause() |
TMergeInsertClause |
getInsertClause() |
int |
getType() |
TMergeUpdateClause |
getUpdateClause() |
void |
init(Object arg1)
Initialize a query tree node.
|
void |
init(Object arg1,
Object arg2) |
void |
setCondition(TExpression condition) |
void |
setDeleteClause(TMergeDeleteClause deleteClause) |
void |
setInsertClause(TMergeInsertClause insertClause) |
void |
setType(int type) |
void |
setUpdateClause(TMergeUpdateClause updateClause) |
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 static final int matched
public static final int not_matched
public static final int matched_with_condition
public static final int not_matched_with_condition
public static final int not_matched_by_target
public static final int not_matched_by_target_with_condition
public static final int not_matched_by_source
public static final int not_matched_by_source_with_condition
public void setCondition(TExpression condition)
public int getType()
public TExpression getCondition()
public TMergeUpdateClause getUpdateClause()
public TMergeDeleteClause getDeleteClause()
public TMergeInsertClause getInsertClause()
public void setType(int type)
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 doParse(TCustomSqlStatement psql, ESqlClause plocation)
TParseTreeNode
doParse
in class TParseTreeNode
psql
- SQL statement this node belongs toplocation
- SQL clause this node belongs topublic 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 setUpdateClause(TMergeUpdateClause updateClause)
public void setInsertClause(TMergeInsertClause insertClause)
public void setDeleteClause(TMergeDeleteClause deleteClause)
Copyright © 2019. All rights reserved.