Hello Murray,

Yes, that method is the best way to do what you intend. You can do
something along these lines:

create().select(field("length({1})", String.class, fieldByName("TITLE")))
        .from(tableByName("T_BOOK"))
        .fetch();

I'll add this example to the Javadocs

Cheers
Lukas

2012/5/19 Murray Cumming <[email protected]>:
> Is there any general jOOQ method to escape (and maybe quote) SQL
> identifiers such as table names and field names for use in raw SQL
> queries?
>
> This documentation
> http://www.jooq.org/javadoc/latest/org/jooq/impl/Factory.html#field%
> 28java.lang.String,%20java.lang.Class,%20org.jooq.QueryPart...%29
> rightly says "Be sure to properly ... escape literals ...", but it does
> not recommend how best to do that.
>
> --
> [email protected]
> www.murrayc.com
> www.openismus.com
>

Reply via email to