Merge pull request #17670 from ggsurrel/main

Performance improvement in BatchSingle class
This commit is contained in:
Lukas Eder 2024-11-26 13:22:03 +01:00 committed by GitHub
commit db62f6c107
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

View File

@ -86,6 +86,7 @@ final class BatchSingle extends AbstractBatch implements BatchBindStep {
final Map<String, List<Integer>> nameToIndexMapping;
final List<Object[]> allBindValues;
final int expectedBindValues;
List<Object> defaultValues;
public BatchSingle(Configuration configuration, Query query) {
super(configuration);
@ -127,7 +128,9 @@ final class BatchSingle extends AbstractBatch implements BatchBindStep {
@Override
@SafeVarargs
public final BatchSingle bind(Map<String, Object>... namedBindValues) {
List<Object> defaultValues = dsl.extractBindValues(query);
if (defaultValues == null) {
defaultValues = dsl.extractBindValues(query);
}
Object[][] bindValues = new Object[namedBindValues.length][];
for (int i = 0; i < bindValues.length; i++) {

View File

@ -20,6 +20,7 @@ Authors and contributors of jOOQ or parts of jOOQ in alphabetical order:
- Fabrice Le Roy
- Gonzalo Ortiz Jaureguizar
- Gregory Hlavac
- Guillaume Surrel
- Henrik Sjöstrand
- Ivan Dugic
- Javier Durante