public interface MergeMatchedWhereStep<R extends Record> extends MergeNotMatchedStep<R>
Merge
's DSL API.
Example:
DSLContext create = DSL.using(configuration);
create.mergeInto(table)
.using(select)
.on(condition)
.whenMatchedThenUpdate()
.set(field1, value1)
.set(field2, value2)
.whenNotMatchedThenInsert(field1, field2)
.values(value1, value2)
.execute();
XYZ*Step
types directly from client code
It is usually not recommended to reference any XYZ*Step
types
directly from client code, or assign them to local variables. When writing
dynamic SQL, creating a statement's components dynamically, and passing them
to the DSL API statically is usually a better choice. See the manual's
section about dynamic SQL for details: https://www.jooq.org/doc/latest/manual/sql-building/dynamic-sql.
Drawbacks of referencing the XYZ*Step
types directly:
Modifier and Type | Method and Description |
---|---|
MergeMatchedDeleteStep<R> |
where(Boolean condition)
Deprecated.
- 3.8.0 - [#4763] - Use
where(Condition) or
where(Field) instead. Due to ambiguity between
calling this method using Field.equals(Object)
argument, vs. calling the other method via a
Field.equal(Object) argument, this method will be
removed in the future. |
MergeMatchedDeleteStep<R> |
where(Condition condition)
Add an additional
WHERE clause to the preceding
WHEN MATCHED THEN UPDATE clause. |
MergeMatchedDeleteStep<R> |
where(Field<Boolean> condition)
Add an additional
WHERE clause to the preceding
WHEN MATCHED THEN UPDATE clause. |
whenNotMatchedThenInsert, whenNotMatchedThenInsert, whenNotMatchedThenInsert, whenNotMatchedThenInsert, whenNotMatchedThenInsert, whenNotMatchedThenInsert, whenNotMatchedThenInsert, whenNotMatchedThenInsert, whenNotMatchedThenInsert, whenNotMatchedThenInsert, whenNotMatchedThenInsert, whenNotMatchedThenInsert, whenNotMatchedThenInsert, whenNotMatchedThenInsert, whenNotMatchedThenInsert, whenNotMatchedThenInsert, whenNotMatchedThenInsert, whenNotMatchedThenInsert, whenNotMatchedThenInsert, whenNotMatchedThenInsert, whenNotMatchedThenInsert, whenNotMatchedThenInsert, whenNotMatchedThenInsert, whenNotMatchedThenInsert, whenNotMatchedThenInsert
bind, bind, cancel, close, execute, executeAsync, executeAsync, getBindValues, getParam, getParams, getSQL, getSQL, getSQL, isExecutable, keepStatement, queryTimeout
attach, configuration, detach
@Support(value={CUBRID,ORACLE,SQLSERVER}) MergeMatchedDeleteStep<R> where(Condition condition)
WHERE
clause to the preceding
WHEN MATCHED THEN UPDATE
clause.
WHEN MATCHED THEN UPDATE SET .. WHERE [ condition ]
WHEN MATCHED AND [ condition ] THEN UPDATE SET ..
@Support(value={CUBRID,ORACLE,SQLSERVER}) MergeMatchedDeleteStep<R> where(Field<Boolean> condition)
WHERE
clause to the preceding
WHEN MATCHED THEN UPDATE
clause.
WHEN MATCHED THEN UPDATE SET .. WHERE [ condition ]
WHEN MATCHED AND [ condition ] THEN UPDATE SET ..
@Deprecated @Support(value={CUBRID,ORACLE,SQLSERVER}) MergeMatchedDeleteStep<R> where(Boolean condition)
where(Condition)
or
where(Field)
instead. Due to ambiguity between
calling this method using Field.equals(Object)
argument, vs. calling the other method via a
Field.equal(Object)
argument, this method will be
removed in the future.WHERE
clause to the preceding
WHEN MATCHED THEN UPDATE
clause.
WHEN MATCHED THEN UPDATE SET .. WHERE [ condition ]
WHEN MATCHED AND [ condition ] THEN UPDATE SET ..
Copyright © 2019. All rights reserved.