Thanks for your message. On Mon, Aug 26, 2024 at 5:54 PM Nico van de Kamp <nicovandek...@gmail.com> wrote:
> I've written an SQL query and put this in the JooQ converter. > I have tried a lot but the Select statement on this moment the issue why > it is not correct: > > usingDSL { context -> > > context.select( > case_() > .when(count().gt(inline(0)), inline(true)) > .otherwise(inline(false)) > ) > I have tried to put in the case_(count()) and then when (true, true), but > still an error. > I have tried with else_ (false), is also wrong. > I'm not sure what this means, I'm sorry. Why would it be wrong? Are you getting an error? Are you getting the wrong result? Please be specific. Btw, you don't have to turn your condition into a boolean. Just select the condition itself: select(count().gt(0)) > Another thing what I'm asking myself is why is everything quoted when > convertedwith the JooQ converter? > Why not just this: > .from(ZAAK).`as`("zz"), > (AGENDA). `as`("za"), > (AGENDA_ITEM). `as`("za"), > ) > > Instead off: > > .from( > table(unquotedName("zaak")).`as`(unquotedName("zz")), > table(unquotedName("agenda")).`as`(unquotedName("za")), > table(unquotedName("agenda_item")).`as`(unquotedName("zai")) > "table(unquotedName("zaak")).`as`(unquotedName("zz"))" used. > > Everything is quoted also field names like: > .where(field(name("zai2", "agenda_id")).eq(field(name("zai", "agenda_id"))) > > Why not: > .where(zai2.AGENDA_ID.eq(zai.AGENDA_ID) > > This is so hard to read > See: https://www.jooq.org/doc/latest/manual/sql-building/dsl-context/custom-settings/settings-name-style/ -- 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 jooq-user+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jooq-user/CAB4ELO5KK2v2y67esNEpOV-5AYV8M5bQKodmz0XUezM_07HXRw%40mail.gmail.com.