I'm not sure what blog post you're referring to, perhaps this one? https://blog.jooq.org/2014/12/30/the-awesome-postgresql-9-4-sql2003-filter-clause-for-aggregate-functions/
I've blogged about the FILTER clause a couple of times, and of course, jOOQ supports it natively and emulates it using CASE expressions if not natively supported (i.e. in all databases other than HSQLDB and PostgreSQL). Just write, e.g. DSL.max(T.VALUE).filterWhere(T.API_SETTING_PARAMETER_ID.eq(46)) I've just realised that this clause is missing from the manual. Will add it soon: https://github.com/jOOQ/jOOQ/issues/7048 Cheers, Lukas 2018-01-12 22:56 GMT+01:00 Samir Faci <[email protected]>: > I was wondering how one would execute this query with generated classes > from Jooq? > > > This is the raw SQL I would like to implement. > > select provider_3pas_mapping_id, max(value) filter (where > api_setting_parameter_id = 46) as username, max(value) filter (where > api_setting_parameter_id = 47) as passwd from > integration.api_setting_parameter_value as vjoin > integration.api_setting_parameter as p on v.api_setting_parameter_id = p.id > and data_source = 'Foobar' group by 1; > > > The only note I found related to this is from an old 2015 blog. Is this > supported by jooq? or does it have > to be native SQL ? > > > -- > Thank you > Samir Faci > https://keybase.io/csgeek > > -- > 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.
