- [jOOQ/jOOQ#8899] Implement specialised emulation for Oracle single row INSERT .. RETURNING with expressions
- [jOOQ/jOOQ#8901] Cannot use INSERT .. RETURNING in Oracle to fetch back a UDT
Depending on what local variable types are used in the user's Java code
(and even on which Java compiler is being used!) a call intended for
`DSL#all(Field...)` may end up being compiled to call
`DSL#all(Object...)`.
To guard against such situations the `DSL#all(Object...)` and
`DSL#any(Object...)` methods now check if the argument is actually an
instance of `Field[]`.
Also fixes parser, which was a victim of the problem described above.
The implementation of jOOQ/jOOQ#8577 was generalized by building on the
already present quantified predicates support in jOOQ. Thus there are
now the new overloads `Field#like(QuantifiedSelect)` and
`Field#notLike(QuantifiedSelect)` which can be used together with any of
the existing `DSL#any()` and `DSL#all()` overloads. In addition there
are also the new overloads `DSL#any(Field...)` and `DSL#all(Field...)`.
On the implementation side the new predicates are either implemented by
AND- or OR-chaining `LIKE` or `NOT LIKE` predicates (as appropriate) or
for the subquery case by using a query like:
```sql
[TRUE|FALSE] = [ANY|ALL] (
SELECT <field> {NOT} LIKE "PATTERN"
FROM <subquery> AS "T"("PATTERN")
)
```
This utility does not go through the ExecuteListener#exception() lifecycle and should thus be avoided. It is difficult to remove completely because of DML RETURNING clauses, which need quite some refactoring for the lifecycle to work correctly.
While removing the SQL templating the parentheses went missing in some
of the rendered SQL. Also added parenthesis pairs in a few cases where
it might also have been missing before.
Postgres NEXTVAL() and CURRVAL() require a string literal as argument.
This commit corrects the quote escaping in this string literal.
Also the syntax for H2 is changed from `nextval('my_schema',
'my_sequence')` to `my_schema.my_sequence.nextval`.
Oracle's `NO` clauses need to be rendered as e.g. `NOCACHE` rather than
`NO CACHE`.
Additionally the parser should also accept this alternative syntax.
The refactoring in `ConvertDateTime` was not quite correct for ORACLE
and POSTGRES. This has been fixed now by replacing some `break`
statements with `return` statements.