public class MergeUsing extends Prepared
| Modifier and Type | Class and Description |
|---|---|
static class |
MergeUsing.When
Abstract WHEN command of the MERGE statement.
|
static class |
MergeUsing.WhenMatched |
static class |
MergeUsing.WhenNotMatched |
create, parameters, prepareAlways, session, sqlStatement| Constructor and Description |
|---|
MergeUsing(Session session,
TableFilter targetTableFilter) |
| Modifier and Type | Method and Description |
|---|---|
void |
addWhen(MergeUsing.When w)
Adds WHEN command.
|
Expression |
getOnCondition() |
java.lang.String |
getPlanSQL(boolean alwaysQuote)
Get the SQL statement with the execution plan.
|
Query |
getQuery() |
java.lang.String |
getQueryAlias() |
TableFilter |
getSourceTableFilter() |
Table |
getTargetTable() |
TableFilter |
getTargetTableFilter() |
int |
getType()
Get the command type as defined in CommandInterface
|
java.util.ArrayList<MergeUsing.When> |
getWhen() |
boolean |
isTransactional()
Check if this command is transactional.
|
protected void |
merge(Row sourceRow)
Merge the given row.
|
void |
prepare()
Prepare this statement.
|
ResultInterface |
queryMeta()
Get an empty result set containing the meta data.
|
void |
setOnCondition(Expression condition) |
void |
setQuery(Query query) |
void |
setQueryAlias(java.lang.String alias) |
void |
setSourceTableFilter(TableFilter sourceTableFilter) |
void |
setTargetTable(Table targetTable) |
void |
setTargetTableFilter(TableFilter targetTableFilter) |
int |
update()
Execute the statement.
|
checkCanceled, checkParameters, getCteCleanups, getCurrentRowNumber, getObjectId, getParameters, getPersistedObjectId, getSession, getSimpleSQL, getSQL, getSQL, isCacheable, isQuery, isReadOnly, needRecompile, query, setCommand, setCteCleanups, setCurrentRowNumber, setParameterList, setPersistedObjectId, setPrepareAlways, setRow, setSession, setSQL, toStringpublic MergeUsing(Session session, TableFilter targetTableFilter)
public int update()
Preparedprotected void merge(Row sourceRow)
sourceRow - the rowpublic java.lang.String getPlanSQL(boolean alwaysQuote)
PreparedgetPlanSQL in class PreparedalwaysQuote - quote all identifierspublic void prepare()
Preparedpublic void setSourceTableFilter(TableFilter sourceTableFilter)
public TableFilter getSourceTableFilter()
public void setOnCondition(Expression condition)
public Expression getOnCondition()
public java.util.ArrayList<MergeUsing.When> getWhen()
public void addWhen(MergeUsing.When w)
w - new WHEN command to add (update, delete or insert).public void setQueryAlias(java.lang.String alias)
public java.lang.String getQueryAlias()
public Query getQuery()
public void setQuery(Query query)
public void setTargetTableFilter(TableFilter targetTableFilter)
public TableFilter getTargetTableFilter()
public Table getTargetTable()
public void setTargetTable(Table targetTable)
public boolean isTransactional()
PreparedisTransactional in class Preparedpublic ResultInterface queryMeta()
Prepared