org.jooq
Interface MergeUsingStep<R extends Record>


public interface MergeUsingStep<R extends Record>

This type is used for the Merge's DSL API.

Example:

 Factory create = new Factory();

 create.mergeInto(table)
       .using(select)
       .on(condition)
       .whenMatchedThenUpdate()
       .set(field1, value1)
       .set(field2, value2)
       .whenNotMatchedThenInsert(field1, field2)
       .values(value1, value2)
       .execute();
 

Author:
Lukas Eder

Method Summary
 MergeOnStep<R> using(TableLike<?> table)
          Add the USING clause to the MERGE statement
 MergeOnStep<R> usingDual()
          Add a dummy USING clause to the MERGE statement This results in USING(SELECT 1 FROM DUAL) for most RDBMS, or in USING(SELECT 1) AS [dummy_table(dummy_field)] in SQL Server, where derived tables need to be aliased.
 

Method Detail

using

MergeOnStep<R> using(TableLike<?> table)
Add the USING clause to the MERGE statement


usingDual

MergeOnStep<R> usingDual()
Add a dummy USING clause to the MERGE statement

This results in USING(SELECT 1 FROM DUAL) for most RDBMS, or in USING(SELECT 1) AS [dummy_table(dummy_field)] in SQL Server, where derived tables need to be aliased.



Copyright © 2012. All Rights Reserved.