2013/9/20 Eric Schwarzenbach <[email protected]>

>
>
> On Thursday, September 19, 2013 2:13:27 AM UTC-4, Lukas Eder wrote:
>
>>
>> Regarding the optional / not-optional "as" keyword, are you sure, "as" is
>> not rendered by jOOQ? It should be, for PostgreSQL:
>>
>
> Good catch! I am indeed seeing the sql appear without the AS, and just
> verified it again, but looking deeper I realized that these fields are one
> part of the query that I missed making sure were created with a dialect
> specified...this part of the query comes from a DSL.fieldByName(...) and a
> .as(...). I've switched most of my sql generation code to use a DSLContext
> created with a SQLDialect.POSTGRES, but missed a few functions.
>
> Hrm, and now that I look at changing it, I don't see an equivalent of
> DSL.fieldByName(...) on DSLContext.... What would you advise?
>

So, how do you generate your SQL? Do you attach all of your QueryParts to a
DSLContext? Generally, for mere QueryPart rendering, you should probably
use DSLContext.render(), leaving your QueryParts unattached:
http://www.jooq.org/javadoc/latest/org/jooq/DSLContext.html#render(org.jooq.QueryPart)

-- 
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/groups/opt_out.

Reply via email to