[#6088] InsertSetStep.select() should return InsertOnDuplicateStep

This commit is contained in:
lukaseder 2017-04-17 18:44:06 +02:00
parent 65453a5158
commit bea5354283
2 changed files with 2 additions and 2 deletions

View File

@ -324,5 +324,5 @@ public interface InsertSetStep<R extends Record> {
* define a field set for insertion.
*/
@Support
InsertReturningStep<R> select(Select<?> select);
InsertOnDuplicateStep<R> select(Select<?> select);
}

View File

@ -899,7 +899,7 @@ class ParserImpl implements Parser {
SelectQueryImpl<Record> select = parseSelect(ctx);
returning = onDuplicate = (fields == null)
? (InsertOnDuplicateStep<?>) ctx.dsl.insertInto(tableName).select(select)
? ctx.dsl.insertInto(tableName).select(select)
: ctx.dsl.insertInto(tableName).columns(fields).select(select);
}
else if (parseKeywordIf(ctx, "DEFAULT VALUES")) {