Hi there,
Thanks for your question. The org.jooq.Clause has been deprecated because it was not designed well enough to provide predictable introspections into how jOOQ's QueryParts are composed. In fact, they are very arbitrary and there is no guarantee, nor documentation around whether a "clause event" happens before or after a certain keyword, or whatever. Deprecating this is an indication of:
- The fact that the clause is not a very reliable means of identifying the location within the QueryPart tree
- The fact that we will replace this functionality eventually
- The fact that we do not add any new clauses for new statements, e.g. for DDL statements
This doesn't mean you cannot use it for the time being, knowing that we'll provide a replacement for the entire VisitListener functionality as we'll provide a new query object model as public API, with pattern matching capabilities, which will be much better suited to the task of custom SQL transformations. Until then, there are no specific recommendations with respect to replacements, as there are no such replacements yet.
I hope this helps,
Lukas