Hi Ben,

In my opinion, there is no point in accessing a PreparedStatement from a
DSLContext. The DSLContext (= Configuration) lifecycle can match your
entire application's lifecycle, not that of individual transactions, let
alone statements.

The jOOQ type that corresponds to a JDBC Statement is the Query, and it may
indeed maintain a live reference to an open Statement, when
Query.keepStatement == true.

- https://github.com/jOOQ/jOOQ/issues/3715 is one way to use jOOQ (in the
future) to prepare statements, which can then be used outside of jOOQ, e.g.
for execution.
- ExecuteListeners are another way to access statements during execution
(Statement is available after the prepareEnd() event)

Maybe, could you explain what your use-case is and what you're trying to
achieve? Maybe we're not talking about the right thing (yet).

Cheers,
Lukas



2015-12-12 21:23 GMT+01:00 Ben Hood <[email protected]>:

> Might this question be related to https://github.com/jOOQ/jOOQ/issues/3715
> ?
>
> On Sat, Dec 12, 2015 at 8:21 PM, Ben Hood <[email protected]> wrote:
> > Hi Lukas,
> >
> > I'm wondering what the idiomatic way of accessing the
> > PreparedStatement from a DSLContext is in JOOQ 3.7. I can see the
> > BindContext interface offers
> >
> > PreparedStatement statement();
> >
> > But I was wondering how you access this from the DSLContext.
> >
> > Cheers,
> >
> > Ben
>
> --
> 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.
>

-- 
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