[#3247] InsertSetMoreStep must not extend InsertSetStep

This commit is contained in:
Lukas Eder 2014-05-07 12:38:32 +02:00
parent b27d73c390
commit 2fe3127671
2 changed files with 44 additions and 1 deletions

View File

@ -40,6 +40,8 @@
*/
package org.jooq;
import java.util.Map;
/**
* This type is used for the {@link Insert}'s alternative DSL API.
* <p>
@ -60,7 +62,46 @@ package org.jooq;
*
* @author Lukas Eder
*/
public interface InsertSetMoreStep<R extends Record> extends InsertSetStep<R>, InsertOnDuplicateStep<R> {
public interface InsertSetMoreStep<R extends Record> extends InsertOnDuplicateStep<R> {
/**
* Set a value for a field in the <code>INSERT</code> statement.
*/
@Support
<T> InsertSetMoreStep<R> set(Field<T> field, T value);
/**
* Set a value for a field in the <code>INSERT</code> statement.
*/
@Support
<T> InsertSetMoreStep<R> set(Field<T> field, Field<T> value);
/**
* Set a value for a field in the <code>INSERT</code> statement.
*/
@Support
<T> InsertSetMoreStep<R> set(Field<T> field, Select<? extends Record1<T>> value);
/**
* Set values in the <code>INSERT</code> statement.
* <p>
* Values can either be of type <code>&lt;T&gt;</code> or
* <code>Field&lt;T&gt;</code>. jOOQ will attempt to convert values to their
* corresponding field's type.
*/
@Support
InsertSetMoreStep<R> set(Map<? extends Field<?>, ?> map);
/**
* Set values in the <code>INSERT</code> statement.
* <p>
* This is the same as calling {@link #set(Map)} with the argument record
* treated as a <code>Map<Field<?>, Object></code>.
*
* @see #set(Map)
*/
@Support
InsertSetMoreStep<R> set(Record record);
/**
* Add an additional record to the <code>INSERT</code> statement

View File

@ -56,6 +56,7 @@ import org.jooq.InsertOnDuplicateSetMoreStep;
import org.jooq.InsertQuery;
import org.jooq.InsertResultStep;
import org.jooq.InsertSetMoreStep;
import org.jooq.InsertSetStep;
import org.jooq.InsertValuesStep1;
import org.jooq.InsertValuesStep2;
import org.jooq.InsertValuesStep3;
@ -118,6 +119,7 @@ class InsertImpl<R extends Record, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
InsertValuesStep21<R, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21>,
InsertValuesStep22<R, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22>,
InsertValuesStepN<R>,
InsertSetStep<R>,
InsertSetMoreStep<R>,
InsertOnDuplicateSetMoreStep<R>,
InsertResultStep<R> {