Package com.exasol.sql.dml.merge
Class NotMatchedClause
- java.lang.Object
-
- com.exasol.sql.AbstractFragment
-
- com.exasol.sql.dml.merge.NotMatchedClause
-
- All Implemented Interfaces:
MergeFragment
,Fragment
public class NotMatchedClause extends AbstractFragment implements MergeFragment
Representation of theWHEN NOT MATCHED
part of an SQLMERGE statement
.
-
-
Field Summary
-
Fields inherited from class com.exasol.sql.AbstractFragment
root
-
-
Constructor Summary
Constructors Constructor Description NotMatchedClause(Fragment root)
Create a new instance of aNotMatchedClause
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(MergeVisitor visitor)
Accept a visitor (e.g.MergeInsertClause
getInsert()
Get theTHEN INSERT
clause.boolean
hasInsert()
Check if theTHEN INSERT
clause is present.MergeInsertClause
thenInsert()
Select inserting as merge strategy for rows from the source for which no match in the destination exists.-
Methods inherited from class com.exasol.sql.AbstractFragment
getRoot
-
-
-
-
Constructor Detail
-
NotMatchedClause
public NotMatchedClause(Fragment root)
Create a new instance of aNotMatchedClause
.- Parameters:
root
- root SQL statement thisWHEN NOT MATCHED
clause belongs to
-
-
Method Detail
-
thenInsert
public MergeInsertClause thenInsert()
Select inserting as merge strategy for rows from the source for which no match in the destination exists.- Returns:
- update clause
-
hasInsert
public boolean hasInsert()
Check if theTHEN INSERT
clause is present.- Returns:
true
if theTHEN INSERT
clause is present
-
getInsert
public MergeInsertClause getInsert()
Get theTHEN INSERT
clause.- Returns:
THEN INSERT
clause
-
accept
public void accept(MergeVisitor visitor)
Description copied from interface:MergeFragment
Accept a visitor (e.g. a renderer or validator).- Specified by:
accept
in interfaceMergeFragment
- Parameters:
visitor
- visitor to accept
-
-