public class Merge extends AbstractFragment implements SqlStatement, MergeFragment
root| Constructor and Description |
|---|
Merge(String destinationTable)
Create a new instance of a
Merge. |
Merge(String destinationTable,
String alias)
Create a new instance of a
Merge. |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(MergeVisitor visitor)
Accept a visitor (e.g.
|
BooleanExpression |
getCondition()
Get the merge condition.
|
UsingClause |
getUsing()
Get the
USING clause of the MERGE statement. |
Merge |
on(BooleanExpression condition)
Define the merge criteria.
|
Merge |
using(String sourceTable)
Define the data source.
|
Merge |
using(String sourceTable,
String as)
Define the data source.
|
MatchedClause |
whenMatched()
Define the merge strategy if the match criteria is met.
|
NotMatchedClause |
whenNotMatched()
Define the merge strategy if the match criteria is not met.
|
getRootpublic Merge(String destinationTable)
Merge.destinationTable - table into which the data should be mergedpublic Merge using(String sourceTable)
sourceTable - table where the data to be merged originatesthis for fluent programmingpublic Merge using(String sourceTable, String as)
sourceTable - table where the data to be merged originatesas - table aliasthis for fluent programmingpublic Merge on(BooleanExpression condition)
condition - criteria that must be met for the rows in source and destination to be considered a match.this for fluent programmingpublic MatchedClause whenMatched()
public NotMatchedClause whenNotMatched()
public UsingClause getUsing()
USING clause of the MERGE statement.public BooleanExpression getCondition()
public void accept(MergeVisitor visitor)
MergeFragmentaccept in interface MergeFragmentvisitor - visitor to acceptCopyright © 2018–2019. All rights reserved.