public class MatchedClause extends AbstractFragment implements MergeFragment
WHEN MATCHED part of an SQL MERGE statement.
This class supports two different strategies, updating matching rows or deleting matching rows.
root| Constructor and Description |
|---|
MatchedClause(Fragment root)
Create a new instance of a
MatchedClause. |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(MergeVisitor visitor)
Accept a visitor (e.g.
|
MergeDeleteClause |
getDelete()
Get the
THEN DELETE clause. |
MergeUpdateClause |
getUpdate()
Get the
THEN UPDATE clause. |
boolean |
hasDelete()
Check if the
THEN DELETE clause is present. |
boolean |
hasUpdate()
Check if the
THEN UPDATE clause is present. |
MergeDeleteClause |
thenDelete()
Select deleting as merge strategy for rows where that are considered matches between source and destination.
|
MergeUpdateClause |
thenUpdate()
Select updating as merge strategy for rows where that are considered matches between source and destination.
|
getRootpublic MatchedClause(Fragment root)
MatchedClause.root - root SQL statement this WHEN MATCHED clause belongs topublic MergeUpdateClause thenUpdate()
public boolean hasUpdate()
THEN UPDATE clause is present.true if the update clause is presentpublic MergeUpdateClause getUpdate()
THEN UPDATE clause.THEN UPDATE clausepublic MergeDeleteClause thenDelete()
public boolean hasDelete()
THEN DELETE clause is present.true if the delete clause is present.public MergeDeleteClause getDelete()
THEN DELETE clause.THEN DELETE clausepublic void accept(MergeVisitor visitor)
MergeFragmentaccept in interface MergeFragmentvisitor - visitor to acceptCopyright © 2018–2021. All rights reserved.