SQL templating
When we talk about SQL templating or the Plain SQL Templating Language, we're talking about covering those cases where the DSL cannot help us express our SQL. The jOOQ DSL strives to cover SQL as much as possible by constantly adding more and more features, but it is normal to still find some corner case syntax or vendor-specific features that won't be covered by the DSL. In such cases, jOOQ allows us to express SQL as plain SQL strings with bind values or query parts via the Plain SQL API.
The Plain SQL API materializes in a set of overloaded methods that can be used where the DSL doesn't help. Here are some examples:
field/table(String sql) field(String sql, Class<T> type) field(String sql, Class<T> type, Object... bindings) field(String sql, Class<T> type, QueryPart... parts) field/table(String sql, Object... bindings) field(String sql, DataType<T> type) field(String sql, DataType<T> type, Object... bindings) field...