Suppose I have a decomposed query in some format, like "fields=a,b,c;
whereClause='1=1'; groupBy=b,c;" etc. Some parts of the query might be
missing, which corresponds to missing SQL part (e.g. a select without where
clause). Having that, I'd like to compose a jOOQ query which could be run
by some external executor, suppose a default DSL.using( conn, dialect
).fetch( constructedQuery ).
As you see, because of the class hierarchy (which I actually like and
admire a bit, since I can see it could not be easily designed), I either
need multiple class casts or lots of nested if-statements - and both
options are not really exciting.
So maybe I'm missing something, or maybe there's an alternative builder for
jOOQ queries (if not, I suppose one of the best solutions would be to have
one), with which the code would look like the following:
Hope I managed to clearly describe the problem, but if you need any further
clarification - I would be glad to provide such.
Great, looks like exactly what I was looking for! Sorry for missing that in
the documentation, it's really vast and I probably skipped this small
Is the following a correct way to get a SelectQuery without a DSLContext?
I'd prefer to keep this class a mere transformer, not aware of any
contexts, dialects and moreover database connections.
SelectQuery<Record> select = DSL.select( fieldsList )
.from( table )
On Monday, October 30, 2017 at 5:40:41 PM UTC+2, Lukas Eder wrote:
The 6.0.5 release log claims they've solved the issue, but the problem
still applies to normal VARCHAR columns.
I tried converting the table from latin1 to utf8mb4, changing the
characterSetResults to latin1, then utf8, but nothing works.
The only thing that works is using ResultSet.getBytes instead of getString:
new String(res.getBytes("columnName"), "UTF-8")
Is there any way I can get JOOQ to use getBytest instead of getString?
jOOQ just passes Strings through to JDBC and fetches them from JDBC without
Do note that the encoding used by client / server depends on a variety of
settings, including the collation of the server, of the individual column,
of the driver (you can override things in the JDBC connection string) and
on the JVM.
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to [hidden email].