Hello Mohit,

2014-04-02 15:55 GMT+02:00 Mohit Jaggi <[email protected]>:

> I wanted to "cache" the stmt, then do values().execute(). No worries, I
> can create a new stmt when I need it. I think a clearValues() would be nice
> to have but it is not a big deal.
>

Hmm, I'm not sure if clearValues() makes much sense in the context of the
DSL API, or even the model API. In the case of an INSERT statement, would
clearValues() just reset all bind values to NULL, or would it remove the
VALUES clause? What about multi-record INSERTs? Would all records be
removed? And what would happen with the PostgreSQL INSERT .. RETURNING
statement, or the MySQL INSERT .. ON DUPLICATE KEY UPDATE statement? What
would happen with the SQL standard INSERT .. SELECT statement? I think you
might see my reservations, now and why I wanted to understand your actual
use-case first...

Note, if this is just about inserting and re-inserting a single record into
a single table, you might also want to look into jOOQ's CRUD features:
http://www.jooq.org/doc/latest/manual/sql-execution/crud-with-updatablerecords/

UpdatableRecord.store() etc might be more along the lines of what you're
looking for.

Cheers
Lukas

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to