I'd like to get JOOQ to render column names with quotes. This is what I tried, reading the docs and StackOverflow:
DSLContext sql = DSL.using( SQLDialect.SQL99,
System.out.println( "Quoted: " + (sql.settings().getRenderNameStyle()==RenderNameStyle.QUOTED) );
Table<Record> table = table("MyTable");
Field<Long> lid = field("id",Long.class);
String sqlStr = sql.renderInlined(
sql.select( lid, field("type"), field("request.id"), field("UPPERCASE"), field("lowercase") )
DSL.field(String) methods are used to embed "plain SQL" into jOOQ. jOOQ doesn't parse your SQL strings, and thus doesn't know which parts you considered to be "names", such as
I'm experimenting with an unsupported database, therefore the SQL99. Side question: Why is SQL99 deprecated in JOOQ?
Because the name is misleading. jOOQ isn't really generating SQL99 as there are no integration tests verifying that the output is really correct or meaningful according to the standard. In a future version of jOOQ,
SQL99 will be replaced by a
DEFAULT dialect, which probably won't work on any database.