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

tech.ydb.jooq.dsl.replace.ReplaceSetStep Maven / Gradle / Ivy

The newest version!
package tech.ydb.jooq.dsl.replace;

import java.util.Collection;
import java.util.Map;
import org.jooq.CheckReturnValue;
import org.jooq.Field;
import org.jooq.Name;
import org.jooq.Record;
import org.jooq.Record1;
import org.jooq.Select;
import org.jooq.Table;
import tech.ydb.jooq.Replace;
import tech.ydb.jooq.YdbDSLContext;

/**
 * This type is used for the {@link Replace}'s alternative DSL API.
 * 

* Example:


 * YdbDSLContext create = YDB.using(configuration);
 *
 * create.replaceInto(table)
 *       .set(field1, value1)
 *       .set(field2, value2)
 *       .newRecord()
 *       .set(field1, value3)
 *       .set(field2, value4)
 *       .execute();
 * 
*

Referencing 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: *

    *
  • They're operating on mutable implementations (as of jOOQ 3.x)
  • *
  • They're less composable and not easy to get right when dynamic SQL gets * complex
  • *
  • They're less readable
  • *
  • They might have binary incompatible changes between minor releases
  • *
*/ public interface ReplaceSetStep { /** * Set the columns for replace. */ @CheckReturnValue ReplaceValuesStepN columns(Field... fields); /** * Set the columns for replace. */ @CheckReturnValue ReplaceValuesStepN columns(Collection> fields); /** * Set the columns for replace. */ @CheckReturnValue ReplaceValuesStep1 columns(Field field1); /** * Set the columns for replace. */ @CheckReturnValue ReplaceValuesStep2 columns(Field field1, Field field2); /** * Set the columns for replace. */ @CheckReturnValue ReplaceValuesStep3 columns(Field field1, Field field2, Field field3); /** * Set the columns for replace. */ @CheckReturnValue ReplaceValuesStep4 columns(Field field1, Field field2, Field field3, Field field4); /** * Set the columns for replace. */ @CheckReturnValue ReplaceValuesStep5 columns(Field field1, Field field2, Field field3, Field field4, Field field5); /** * Set the columns for replace. */ @CheckReturnValue ReplaceValuesStep6 columns(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6); /** * Set the columns for replace. */ @CheckReturnValue ReplaceValuesStep7 columns(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7); /** * Set the columns for replace. */ @CheckReturnValue ReplaceValuesStep8 columns(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8); /** * Set the columns for replace. */ @CheckReturnValue ReplaceValuesStep9 columns(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9); /** * Set the columns for replace. */ @CheckReturnValue ReplaceValuesStep10 columns(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10); /** * Set the columns for replace. */ @CheckReturnValue ReplaceValuesStep11 columns(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11); /** * Set the columns for replace. */ @CheckReturnValue ReplaceValuesStep12 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); /** * Set the columns for replace. */ @CheckReturnValue ReplaceValuesStep13 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); /** * Set the columns for replace. */ @CheckReturnValue ReplaceValuesStep14 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); /** * Set the columns for replace. */ @CheckReturnValue ReplaceValuesStep15 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); /** * Set the columns for replace. */ @CheckReturnValue ReplaceValuesStep16 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); /** * Set the columns for replace. */ @CheckReturnValue ReplaceValuesStep17 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); /** * Set the columns for replace. */ @CheckReturnValue ReplaceValuesStep18 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); /** * Set the columns for replace. */ @CheckReturnValue ReplaceValuesStep19 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); /** * Set the columns for replace. */ @CheckReturnValue ReplaceValuesStep20 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); /** * Set the columns for replace. */ @CheckReturnValue ReplaceValuesStep21 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); /** * Set the columns for replace. */ @CheckReturnValue ReplaceValuesStep22 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); /** * Set a value for a field in the REPLACE statement. */ @CheckReturnValue ReplaceSetMoreStep set(Field field, T value); /** * Set a value for a field in the REPLACE statement. */ @CheckReturnValue ReplaceSetMoreStep set(Field field, Field value); /** * Set a value for a field in the REPLACE statement. */ @CheckReturnValue ReplaceSetMoreStep set(Field field, Select> value); /** * Set a null value for a field in the REPLACE * statement. *

* This method is convenience for calling {@link #set(Field, Object)}, * without the necessity of casting the Java null literal to * (T). */ @CheckReturnValue ReplaceSetMoreStep setNull(Field field); /** * Set values in the REPLACE statement. *

* Keys can either be of type {@link String}, {@link Name}, or * {@link Field}. *

* Values can either be of type <T> or * Field<T>. jOOQ will attempt to convert values to their * corresponding field's type. */ @CheckReturnValue ReplaceSetMoreStep set(Map map); /** * Set values in the REPLACE statement. *

* This is the same as calling {@link #set(Map)} with the argument record * treated as a Map<Field<?>, Object>, except that the * {@link Record#changed()} flags are taken into consideration in order to * update only changed values. * * @see #set(Map) */ @CheckReturnValue ReplaceSetMoreStep set(Record record); /** * Set values in the REPLACE statement. *

* This is convenience for multiple calls to {@link #set(Record)} and * {@link ReplaceSetMoreStep#newRecord()}. * * @see #set(Record) */ @CheckReturnValue ReplaceSetMoreStep set(Record... records); /** * Set values in the REPLACE statement. *

* This is convenience for multiple calls to {@link #set(Record)} and * {@link ReplaceSetMoreStep#newRecord()}. * * @see #set(Record) */ @CheckReturnValue ReplaceSetMoreStep set(Collection records); /** * Add values to the replace statement with implicit field names. */ @CheckReturnValue ReplaceValuesStepN values(Object... values); /** * Add values to the replace statement with implicit field names. */ @CheckReturnValue ReplaceValuesStepN values(Field... values); /** * Add values to the replace statement with implicit field names. */ @CheckReturnValue ReplaceValuesStepN values(Collection values); /** * Use a SELECT statement as the source of values for the * REPLACE statement. *

* This variant of the REPLACE … SELECT statement does not * allow for specifying a subset of the fields replaceed into. It will replace * into all fields of the table specified in the INTO clause. * Use {@link YdbDSLContext#replaceInto(Table, Field...)} or * {@link YdbDSLContext#replaceInto(Table, Collection)} instead, to * define a field set for replaceion. */ @CheckReturnValue Replace select(Select select); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy