Hello,

> I know it's
> on the TODO but I did read it was a low priority, so just here to give
> my point of view about this feature :p  Thanks.

Nothing wrong with that :-)

> Hello, I think addBatch feature is missing in your framework, imo it's
> an important feature because it can have a serious performances
> impact, specially when you do update of multiples records.

I agree. The reason why I set it to low prio at the moment is because
I don't have a clear feeling about the API design. With JDBC, you can
simply "serialize" every single insert's / update's bind variables,
while re-using the actual statement itself. For jOOQ, this is a bit
different. When you write

create.update(T_AUTHOR)
      .set(TAuthor.FIRST_NAME, "Hermann")
      .set(TAuthor.LAST_NAME, "Hesse")
      .where(TAuthor.ID.equal(3))

You'll have three bind variables: "Herman", "Hesse", 3
Now, let's say you want to update a second record in batch mode:
"Günter", "Grass", 4

How to add more bind variables and execute the whole query as a batch
query? Like this?

create.update(T_AUTHOR)
      .set(TAuthor.FIRST_NAME, "Hermann")
      .set(TAuthor.LAST_NAME, "Hesse")
      .where(TAuthor.ID.equal(3))
      .addBatch("Günter", "Grass", 4)
      .addBatch(...)
      .execute();

That's a bit awkward... I'm open to ideas!

Cheers
Lukas

Reply via email to