You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixed jOOQ "findCompanyUsingSimpleStaticStatement()". Improved a way how to create new DSL context using the current connection but with "static statement settings".
// This is the only way I found how to actually do a static Statement in JOOQ (so not the default
70
-
// prepared statement, but simple static statement where you do not bind values). We create new instance of DSLContext
71
-
// using Settings which are configured to use static statements. The important factor here is
72
-
// to create new context based on the Connection of autowired DSLContext (therefore the usage of create.connection()
73
-
// method) - this is the only way to ensure that the this static statement will be executed in same transaction
74
-
// as other statements called through autowired DSLContext.
75
-
//
76
-
// If you create new DSLContext using the some generally available (autowired) datasource, then you'll create
77
-
// completely new JOOQ configuration with completely new connection -> such statements will be executed in
78
-
// their own transactions!
79
-
//
80
-
// FIXME: I don't like the usage of AtomicReference here to get the value out of the lambda. If anyone has better class where to store the value, please advise.
0 commit comments