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 |
|---|---|
| public @NotNull MergeOnConditionStep | on(Condition condition)
Deprecated
as a consequence of
Provide join conditions and proceed to the next step, connecting them
with each other with Condition and MergeOnConditionStep being deprecated.
Operator#AND.
|
| public @NotNull MergeOnConditionStep | on(Condition... conditions)
Deprecated
as a consequence of
Provide join conditions and proceed to the next step, connecting them
with each other with Condition and MergeOnConditionStep being deprecated.
Operator#AND.
|
| public @NotNull MergeOnConditionStep | on(Field<Boolean> condition)
Deprecated
as a consequence of
Provide join conditions and proceed to the next step
Field and MergeOnConditionStep being deprecated.
|
| public @NotNull MergeOnConditionStep | on(SQL sql)
Deprecated
as a consequence of
Provide join conditions and proceed to the next stepMergeOnConditionStep being deprecated.
Note When inserting plain SQL into jOOQ objects, you must guarantee syntax integrity. |
| public @NotNull MergeOnConditionStep | on(String sql)
Deprecated
as a consequence of
Provide join conditions and proceed to the next stepMergeOnConditionStep being deprecated.
Note When inserting plain SQL into jOOQ objects, you must guarantee syntax integrity. |
| public @NotNull MergeOnConditionStep | on(String sql, Object... bindings)
Deprecated
as a consequence of
Provide join conditions and proceed to the next stepMergeOnConditionStep being deprecated.
Note When inserting plain SQL into jOOQ objects, you must guarantee syntax integrity. |
| public @NotNull MergeOnConditionStep | on(String sql, QueryPart... parts)
Deprecated
as a consequence of
Provide join conditions and proceed to the next stepMergeOnConditionStep being deprecated.
Note When inserting plain SQL into jOOQ objects, you must guarantee syntax integrity. |
| on | back to summary |
|---|---|
| public @NotNull MergeOnConditionStep Deprecated as a consequence of Provide join conditions and proceed to the next step, connecting them
with each other with | |
| on | back to summary |
|---|---|
| public @NotNull MergeOnConditionStep Deprecated as a consequence of Provide join conditions and proceed to the next step, connecting them
with each other with | |
| on | back to summary |
|---|---|
| public @NotNull MergeOnConditionStep Deprecated as a consequence of Provide join conditions and proceed to the next step | |
| on | back to summary |
|---|---|
| public @NotNull MergeOnConditionStep Deprecated as a consequence of Provide join conditions and proceed to the next step Note When inserting plain SQL into jOOQ objects, you must guarantee syntax integrity. You may also create the possibility of malicious SQL injection. Be sure to properly use bind variables and/or escape literals when concatenated into SQL clauses! | |
| on | back to summary |
|---|---|
| public @NotNull MergeOnConditionStep Deprecated as a consequence of Provide join conditions and proceed to the next step Note When inserting plain SQL into jOOQ objects, you must guarantee syntax integrity. You may also create the possibility of malicious SQL injection. Be sure to properly use bind variables and/or escape literals when concatenated into SQL clauses! | |
| on | back to summary |
|---|---|
| public @NotNull MergeOnConditionStep Deprecated as a consequence of Provide join conditions and proceed to the next step Note When inserting plain SQL into jOOQ objects, you must guarantee syntax integrity. You may also create the possibility of malicious SQL injection. Be sure to properly use bind variables and/or escape literals when concatenated into SQL clauses!
| |
| on | back to summary |
|---|---|
| public @NotNull MergeOnConditionStep Deprecated as a consequence of Provide join conditions and proceed to the next step Note When inserting plain SQL into jOOQ objects, you must guarantee syntax integrity. You may also create the possibility of malicious SQL injection. Be sure to properly use bind variables and/or escape literals when concatenated into SQL clauses!
| |