[jOOQ/jOOQ#17401] NUMERIC bind values passed to SQL Server VALUES constructor may lose scale if not explicit DataType is supplied
This commit is contained in:
parent
cbf55ed618
commit
75a7884156
@ -204,6 +204,11 @@ package org.jooq.impl;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -969,6 +969,17 @@ public class DefaultBinding<T, U> implements Binding<T, U> {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -51,6 +51,7 @@ import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.function.BiConsumer;
|
||||
import java.util.function.Function;
|
||||
|
||||
import org.jooq.Condition;
|
||||
@ -85,6 +86,20 @@ implements
|
||||
return new QueryPartCollectionView<>(wrapped);
|
||||
}
|
||||
|
||||
static final <T extends QueryPart> QueryPartCollectionView<T> wrap(Collection<T> wrapped, BiConsumer<? super Context<?>, ? super QueryPart> acceptElement) {
|
||||
return new QueryPartCollectionView<>(wrapped) {
|
||||
@Override
|
||||
protected void acceptElement(Context<?> ctx, T part) {
|
||||
|
||||
// [#11969] See QueryPartCollectionView.acceptElement() method
|
||||
if (part instanceof Condition c)
|
||||
acceptElement.accept(ctx, DSL.field(c));
|
||||
else
|
||||
acceptElement.accept(ctx, part);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
QueryPartCollectionView(Collection<T> wrapped) {
|
||||
this.wrapped = wrapped != null ? wrapped : Collections.emptyList();
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user