Can I use JOOQ as an SQL parser?

A full-fledged SQL parser is available from DSLContext.parser() and from DSLContext.parsingConnection() (see the manual's section about parsing connections for the latter).

The SQL Parsing API page gives this trivial example:

ResultQuery<?> query = 
DSL.using(configuration)
   .parser()
   .parseResultQuery("SELECT * FROM (VALUES (1, 'a'), (2, 'b')) t(a, b)");

parseResultQuery is the method you need for a single SELECT query, use parse(String) if you may have multiple queries.

Tags:

Java

Jooq