All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jooq.MergeUsingStep Maven / Gradle / Ivy

The newest version!
/*
 * Copyright (c) 2009-2016, Data Geekery GmbH (http://www.datageekery.com)
 * All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * Other licenses:
 * -----------------------------------------------------------------------------
 * Commercial licenses for this work are available. These replace the above
 * ASL 2.0 and offer limited warranties, support, maintenance, and commercial
 * database integrations.
 *
 * For more information, please visit: http://www.jooq.org/licenses
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 */
package org.jooq;

import static org.jooq.SQLDialect.CUBRID;
// ...
import static org.jooq.SQLDialect.FIREBIRD_3_0;
import static org.jooq.SQLDialect.H2;
// ...
import static org.jooq.SQLDialect.HSQLDB;
// ...
import static org.jooq.SQLDialect.MARIADB;
import static org.jooq.SQLDialect.MYSQL;
// ...
import static org.jooq.SQLDialect.POSTGRES_9_5;
// ...
// ...

import java.util.Collection;

import javax.annotation.Generated;

/**
 * This type is used for the {@link 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();
 * 
* * @author Lukas Eder */ public interface MergeUsingStep extends MergeKeyStepN { /** * Add the USING clause to the SQL standard MERGE * statement */ @Support({ CUBRID, FIREBIRD_3_0, HSQLDB }) MergeOnStep using(TableLike table); /** * Add a dummy USING clause to the SQL standard * 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. */ @Support({ CUBRID, FIREBIRD_3_0, HSQLDB }) MergeOnStep usingDual(); /** * Set the columns for merge (H2-specific syntax). *

* This statement is available from DSL syntax only. It is known to be * supported in some way by any of these dialects: *

* * * * * * * * * * * * * * * * * * * * *
H2H2 natively supports this special syntaxwww.h2database.com/html/grammar.html#merge
HANAHANA natively supports this syntaxhttp://help.sap.com/saphelp_hanaplatform/helpdata/en/20/fc06a7751910149892c0d09be21a38/content.htm
PostgreSQLThis database can emulate the H2-specific MERGE statement via * INSERT .. ON CONFLICT DO UPDATEhttp://www.postgresql.org/docs/9.5/static/sql-insert.html
DB2, Firebird, HSQLDB, Oracle, SQL Server, Sybase SQL AnywhereThese databases can emulate the H2-specific MERGE statement using a * standard SQL MERGE statement, without restrictionsSee {@link DSLContext#mergeInto(Table)} for the standard MERGE statement
*/ @Support({ CUBRID, FIREBIRD_3_0, H2, HSQLDB, MARIADB, MYSQL }) MergeKeyStepN columns(Field... fields); /** * Set the columns for merge (H2-specific syntax). * * @see #columns(Field...) */ @Support({ CUBRID, FIREBIRD_3_0, H2, HSQLDB, MARIADB, MYSQL }) MergeKeyStepN columns(Collection> fields); // [jooq-tools] START [columns] /** * Create a new DSL UPSERT statement ({@link SQLDialect#H2} * MERGE) or {@link SQLDialect#HANA} UPSERT). * * @see DSLContext#mergeInto(Table, Field...) */ @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, FIREBIRD_3_0, H2, HSQLDB, MARIADB, MYSQL, POSTGRES_9_5 }) MergeKeyStep1 columns(Field field1); /** * Create a new DSL UPSERT statement ({@link SQLDialect#H2} * MERGE) or {@link SQLDialect#HANA} UPSERT). * * @see DSLContext#mergeInto(Table, Field...) */ @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, FIREBIRD_3_0, H2, HSQLDB, MARIADB, MYSQL, POSTGRES_9_5 }) MergeKeyStep2 columns(Field field1, Field field2); /** * Create a new DSL UPSERT statement ({@link SQLDialect#H2} * MERGE) or {@link SQLDialect#HANA} UPSERT). * * @see DSLContext#mergeInto(Table, Field...) */ @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, FIREBIRD_3_0, H2, HSQLDB, MARIADB, MYSQL, POSTGRES_9_5 }) MergeKeyStep3 columns(Field field1, Field field2, Field field3); /** * Create a new DSL UPSERT statement ({@link SQLDialect#H2} * MERGE) or {@link SQLDialect#HANA} UPSERT). * * @see DSLContext#mergeInto(Table, Field...) */ @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, FIREBIRD_3_0, H2, HSQLDB, MARIADB, MYSQL, POSTGRES_9_5 }) MergeKeyStep4 columns(Field field1, Field field2, Field field3, Field field4); /** * Create a new DSL UPSERT statement ({@link SQLDialect#H2} * MERGE) or {@link SQLDialect#HANA} UPSERT). * * @see DSLContext#mergeInto(Table, Field...) */ @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, FIREBIRD_3_0, H2, HSQLDB, MARIADB, MYSQL, POSTGRES_9_5 }) MergeKeyStep5 columns(Field field1, Field field2, Field field3, Field field4, Field field5); /** * Create a new DSL UPSERT statement ({@link SQLDialect#H2} * MERGE) or {@link SQLDialect#HANA} UPSERT). * * @see DSLContext#mergeInto(Table, Field...) */ @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, FIREBIRD_3_0, H2, HSQLDB, MARIADB, MYSQL, POSTGRES_9_5 }) MergeKeyStep6 columns(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6); /** * Create a new DSL UPSERT statement ({@link SQLDialect#H2} * MERGE) or {@link SQLDialect#HANA} UPSERT). * * @see DSLContext#mergeInto(Table, Field...) */ @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, FIREBIRD_3_0, H2, HSQLDB, MARIADB, MYSQL, POSTGRES_9_5 }) MergeKeyStep7 columns(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7); /** * Create a new DSL UPSERT statement ({@link SQLDialect#H2} * MERGE) or {@link SQLDialect#HANA} UPSERT). * * @see DSLContext#mergeInto(Table, Field...) */ @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, FIREBIRD_3_0, H2, HSQLDB, MARIADB, MYSQL, POSTGRES_9_5 }) MergeKeyStep8 columns(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8); /** * Create a new DSL UPSERT statement ({@link SQLDialect#H2} * MERGE) or {@link SQLDialect#HANA} UPSERT). * * @see DSLContext#mergeInto(Table, Field...) */ @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, FIREBIRD_3_0, H2, HSQLDB, MARIADB, MYSQL, POSTGRES_9_5 }) MergeKeyStep9 columns(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9); /** * Create a new DSL UPSERT statement ({@link SQLDialect#H2} * MERGE) or {@link SQLDialect#HANA} UPSERT). * * @see DSLContext#mergeInto(Table, Field...) */ @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, FIREBIRD_3_0, H2, HSQLDB, MARIADB, MYSQL, POSTGRES_9_5 }) MergeKeyStep10 columns(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10); /** * Create a new DSL UPSERT statement ({@link SQLDialect#H2} * MERGE) or {@link SQLDialect#HANA} UPSERT). * * @see DSLContext#mergeInto(Table, Field...) */ @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, FIREBIRD_3_0, H2, HSQLDB, MARIADB, MYSQL, POSTGRES_9_5 }) MergeKeyStep11 columns(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11); /** * Create a new DSL UPSERT statement ({@link SQLDialect#H2} * MERGE) or {@link SQLDialect#HANA} UPSERT). * * @see DSLContext#mergeInto(Table, Field...) */ @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, FIREBIRD_3_0, H2, HSQLDB, MARIADB, MYSQL, POSTGRES_9_5 }) MergeKeyStep12 columns(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12); /** * Create a new DSL UPSERT statement ({@link SQLDialect#H2} * MERGE) or {@link SQLDialect#HANA} UPSERT). * * @see DSLContext#mergeInto(Table, Field...) */ @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, FIREBIRD_3_0, H2, HSQLDB, MARIADB, MYSQL, POSTGRES_9_5 }) MergeKeyStep13 columns(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13); /** * Create a new DSL UPSERT statement ({@link SQLDialect#H2} * MERGE) or {@link SQLDialect#HANA} UPSERT). * * @see DSLContext#mergeInto(Table, Field...) */ @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, FIREBIRD_3_0, H2, HSQLDB, MARIADB, MYSQL, POSTGRES_9_5 }) MergeKeyStep14 columns(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14); /** * Create a new DSL UPSERT statement ({@link SQLDialect#H2} * MERGE) or {@link SQLDialect#HANA} UPSERT). * * @see DSLContext#mergeInto(Table, Field...) */ @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, FIREBIRD_3_0, H2, HSQLDB, MARIADB, MYSQL, POSTGRES_9_5 }) MergeKeyStep15 columns(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14, Field field15); /** * Create a new DSL UPSERT statement ({@link SQLDialect#H2} * MERGE) or {@link SQLDialect#HANA} UPSERT). * * @see DSLContext#mergeInto(Table, Field...) */ @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, FIREBIRD_3_0, H2, HSQLDB, MARIADB, MYSQL, POSTGRES_9_5 }) MergeKeyStep16 columns(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14, Field field15, Field field16); /** * Create a new DSL UPSERT statement ({@link SQLDialect#H2} * MERGE) or {@link SQLDialect#HANA} UPSERT). * * @see DSLContext#mergeInto(Table, Field...) */ @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, FIREBIRD_3_0, H2, HSQLDB, MARIADB, MYSQL, POSTGRES_9_5 }) MergeKeyStep17 columns(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14, Field field15, Field field16, Field field17); /** * Create a new DSL UPSERT statement ({@link SQLDialect#H2} * MERGE) or {@link SQLDialect#HANA} UPSERT). * * @see DSLContext#mergeInto(Table, Field...) */ @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, FIREBIRD_3_0, H2, HSQLDB, MARIADB, MYSQL, POSTGRES_9_5 }) MergeKeyStep18 columns(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14, Field field15, Field field16, Field field17, Field field18); /** * Create a new DSL UPSERT statement ({@link SQLDialect#H2} * MERGE) or {@link SQLDialect#HANA} UPSERT). * * @see DSLContext#mergeInto(Table, Field...) */ @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, FIREBIRD_3_0, H2, HSQLDB, MARIADB, MYSQL, POSTGRES_9_5 }) MergeKeyStep19 columns(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14, Field field15, Field field16, Field field17, Field field18, Field field19); /** * Create a new DSL UPSERT statement ({@link SQLDialect#H2} * MERGE) or {@link SQLDialect#HANA} UPSERT). * * @see DSLContext#mergeInto(Table, Field...) */ @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, FIREBIRD_3_0, H2, HSQLDB, MARIADB, MYSQL, POSTGRES_9_5 }) MergeKeyStep20 columns(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14, Field field15, Field field16, Field field17, Field field18, Field field19, Field field20); /** * Create a new DSL UPSERT statement ({@link SQLDialect#H2} * MERGE) or {@link SQLDialect#HANA} UPSERT). * * @see DSLContext#mergeInto(Table, Field...) */ @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, FIREBIRD_3_0, H2, HSQLDB, MARIADB, MYSQL, POSTGRES_9_5 }) MergeKeyStep21 columns(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14, Field field15, Field field16, Field field17, Field field18, Field field19, Field field20, Field field21); /** * Create a new DSL UPSERT statement ({@link SQLDialect#H2} * MERGE) or {@link SQLDialect#HANA} UPSERT). * * @see DSLContext#mergeInto(Table, Field...) */ @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, FIREBIRD_3_0, H2, HSQLDB, MARIADB, MYSQL, POSTGRES_9_5 }) MergeKeyStep22 columns(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14, Field field15, Field field16, Field field17, Field field18, Field field19, Field field20, Field field21, Field field22); // [jooq-tools] END [columns] }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy