[jOOQ/jOOQ#15574] DefaultOtherBinding shouldn't create string literals for inline values for numeric data types

This commit is contained in:
Lukas Eder 2023-09-12 13:55:04 +02:00
parent 2739f355a0
commit 4fb5291fe8

View File

@ -3810,6 +3810,22 @@ public class DefaultBinding<T, U> implements Binding<T, U> {
}
}
@SuppressWarnings({ "unchecked", "rawtypes" })
@Override
void sqlInline0(BindingSQLContext<U> ctx, Object value) throws SQLException {
Binding<?, ?> b = binding(DefaultDataType.getDataType(
DEFAULT, (Class<Object>) value.getClass(), SQLDataType.OTHER
));
if (b instanceof DefaultOtherBinding )
super.sqlInline0(ctx, value);
else if (b instanceof InternalBinding i)
i.sqlInline0(ctx, value);
else
super.sqlInline0(ctx, value);
}
@Override
final void set0(BindingSetSQLOutputContext<U> ctx, Object value) throws SQLException {
throw new DataTypeException("Type " + dataType + " is not supported");