diff --git a/jOOQ/src/main/java/org/jooq/InsertSetMoreStep.java b/jOOQ/src/main/java/org/jooq/InsertSetMoreStep.java index 9dc41f577b..6c28b72c4e 100644 --- a/jOOQ/src/main/java/org/jooq/InsertSetMoreStep.java +++ b/jOOQ/src/main/java/org/jooq/InsertSetMoreStep.java @@ -40,6 +40,8 @@ */ package org.jooq; +import java.util.Map; + /** * This type is used for the {@link Insert}'s alternative DSL API. *

@@ -60,7 +62,46 @@ package org.jooq; * * @author Lukas Eder */ -public interface InsertSetMoreStep extends InsertSetStep, InsertOnDuplicateStep { +public interface InsertSetMoreStep extends InsertOnDuplicateStep { + + /** + * Set a value for a field in the INSERT statement. + */ + @Support + InsertSetMoreStep set(Field field, T value); + + /** + * Set a value for a field in the INSERT statement. + */ + @Support + InsertSetMoreStep set(Field field, Field value); + + /** + * Set a value for a field in the INSERT statement. + */ + @Support + InsertSetMoreStep set(Field field, Select> value); + + /** + * Set values in the INSERT statement. + *

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

+ * This is the same as calling {@link #set(Map)} with the argument record + * treated as a Map, Object>. + * + * @see #set(Map) + */ + @Support + InsertSetMoreStep set(Record record); /** * Add an additional record to the INSERT statement diff --git a/jOOQ/src/main/java/org/jooq/impl/InsertImpl.java b/jOOQ/src/main/java/org/jooq/impl/InsertImpl.java index 33627d15b0..2981486457 100644 --- a/jOOQ/src/main/java/org/jooq/impl/InsertImpl.java +++ b/jOOQ/src/main/java/org/jooq/impl/InsertImpl.java @@ -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, InsertValuesStep22, InsertValuesStepN, + InsertSetStep, InsertSetMoreStep, InsertOnDuplicateSetMoreStep, InsertResultStep {