Commit Graph

7429 Commits

Author SHA1 Message Date
Lukas Eder
bcdadee556 [jOOQ/jOOQ#8905] GeneratorWriter should check the file size prior to
opening existing files to compare contents
2019-07-04 17:15:09 +02:00
Lukas Eder
ab676159fa [jOOQ/jOOQ#8903] Add Support annotation also to Nullability enum 2019-07-04 16:49:18 +02:00
Lukas Eder
58954539cb [jOOQ/jOOQ#8900] Regenerated PostgreSQL information_schema code 2019-07-04 16:45:19 +02:00
Knut Wannheden
f8a6dfacf1 [jOOQ/jOOQ#8900] Make jOOQ compatible with Java 6
- Mostly surround pieces of code with [java-8] preprocessor tags
- Added ExceptionTools#sneakyThrow() which is used in MiniJAXB
2019-07-04 16:26:21 +02:00
Lukas Eder
0309bffc11 [jOOQ/jOOQ#8903] Add Support annotations to DataType methods 2019-07-04 16:25:21 +02:00
Lukas Eder
35b2c864b9 [jOOQ/jOOQ#8904] Add Support annotations to DSL.name() and DSL.keyword() 2019-07-04 16:18:42 +02:00
Lukas Eder
b7d4a75467 [jOOQ/jOOQ#8041] Add missing support annotation to DSL.characterSet() 2019-07-04 16:13:50 +02:00
Lukas Eder
e4a6bfcfd3 [jOOQ/jOOQ#8902] Add missing Support annotation to DSL.collation 2019-07-04 16:12:05 +02:00
Lukas Eder
0b470c64c1 [jOOQ/jOOQ#8899] [jOOQ/jOOQ#8901] More INSERT RETURNING / Oracle fixes
- [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
2019-07-04 15:46:37 +02:00
Lukas Eder
0e6e5e2b3c [jOOQ/jOOQ#8898] Fix INSERT .. RETURNING for Oracle
INSERT .. RETURNING emulation doesn't work on Oracle when returned columns are aliased
2019-07-04 14:11:48 +02:00
Lukas Eder
d6bf5a8fe1 [jOOQ/jOOQ#8897] Fix INSERT .. RETURNING for Oracle
INSERT .. RETURNING emulation doesn't work on Oracle for single row inserts when returning expressions
2019-07-04 13:52:19 +02:00
Lukas Eder
b20658f262 Reverted '[jOOQ/jOOQ#8077] Support YearToSecond with Oracle'
Change added on 2019-06-21. It leads to a few regressions in the Oracle integration tests
2019-07-04 11:15:22 +02:00
Knut Wannheden
a8a20a1a48 [jOOQ/jOOQ#8853] Use parseEscapeClauseIf() consequently 2019-07-03 15:57:37 +02:00
Knut Wannheden
88ed4df42f [jOOQ/jOOQ#8853] Extracted ParserImpl#parseEscapeClauseIf() method 2019-07-03 15:49:47 +02:00
Lukas Eder
a688f1904a Regenerated example code 2019-07-03 15:27:26 +02:00
Lukas Eder
514f2eda6d [jOOQ/jOOQ#5412] Reverted the feature 2019-07-03 15:27:09 +02:00
Knut Wannheden
156386586f [jOOQ/jOOQ#8853] Guard against unexpected method calls
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.
2019-07-03 15:11:27 +02:00
Knut Wannheden
af024cde2d [jOOQ/jOOQ#8853] Support ANY LIKE with subqueries
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")
)
```
2019-07-03 12:51:43 +02:00
Lukas Eder
23b0c94774 [jOOQ/jOOQ#8889] Upgrade scala 2.12 dependency to 2.12.8 2019-07-03 11:15:57 +02:00
Lukas Eder
caa9935385 [jOOQ/jOOQ#8887] Add SQLDataType.DECIMAL_INTEGER(int) as a shortcut for DataType.precision(int) 2019-07-03 10:13:38 +02:00
Lukas Eder
bee81a3933 [jOOQ/jOOQ#8544] ExecuteListener#end() not last lifecycle event when using DSLContext#fetchOne() 2019-07-02 15:53:41 +02:00
Lukas Eder
10735fdb50 [jOOQ/jOOQ#8883] Use noCondition() in fetchXYZ(Table), fetchXYZ(Table, Condition) overloads 2019-07-02 15:16:02 +02:00
Lukas Eder
79070f0f4b [jOOQ/jOOQ#8877] Avoid newly deprecated filterOne() in fetchAny() 2019-07-02 14:58:06 +02:00
Lukas Eder
6209cec91b [jOOQ/jOOQ#8881] Deprecate internal Tools.filterOne() utility
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.
2019-07-02 14:56:39 +02:00
Lukas Eder
45d22cfbed [jOOQ/jOOQ#8877] fetchSingle() failure does not trigger ExecuteListener#exception() event 2019-07-02 14:19:57 +02:00
Lukas Eder
06b3e0aecd [#8863] Fix for ScalaGenerator 2019-07-02 09:43:07 +02:00
Knut Wannheden
17c3871525 Remove some duplicated static imports for SQLDialect 2019-06-28 16:16:56 +02:00
Lukas Eder
00c67b61d3 Sync with commercial repository 2019-06-28 15:21:15 +02:00
Lukas Eder
74f3263653 [jOOQ/jOOQ#8863] Use imported class name in Tables.java to dereference singleton table instance 2019-06-28 15:21:08 +02:00
Lukas Eder
bfa5568764 Sync with commercial distribution 2019-06-28 10:30:19 +02:00
Lukas Eder
0a10df6c3c [jOOQ/jOOQ#8867] Add SQLDialect.supported() 2019-06-28 10:27:23 +02:00
Lukas Eder
d9d491e0aa [jOOQ/jOOQ#2059] Add MariaDB support 2019-06-28 10:26:31 +02:00
Lukas Eder
e65b67a7fe [jOOQ/jOOQ#6745] DDL statements on MySQL create CHAR column instead of
VARCHAR column on unknown lengths
2019-06-27 16:03:43 +02:00
Lukas Eder
d087e4a4f6 Sync with commercial distribution 2019-06-26 16:45:39 +02:00
Lukas Eder
e53dc69b0b Some formatting 2019-06-26 16:21:32 +02:00
Knut Wannheden
3dbcccb65a [jOOQ/jOOQ#8808] Only qualify sequence class references when required
The `Sequences` class will now only have fully qualified references to
the sequence classes when there is a name conflict between the schema
and any of its sequences.
2019-06-26 15:57:20 +02:00
Lukas Eder
1a3d5d0252 [jOOQ/jOOQ-pro#103] Remove dependency between jOOQ-tools and jOOQ 2019-06-26 15:32:25 +02:00
Knut Wannheden
1733cd5eaa [jOOQ/jOOQ#8808] Generate qualified references into Sequences class
The references to the static sequence fields in the generated
`Sequences` class should be fully qualified in order to avoid potential
conflicts between schema and sequence names.
2019-06-26 15:26:46 +02:00
Knut Wannheden
517ad869b6 [jOOQ/jOOQ#8859] Check for sequences in generateSchemaIfEmpty()
The `JavaGenerator` should also generate Java code for schemas which
only contain sequences. This was missing in `generateSchemaIfEmpty()`.
2019-06-26 15:06:45 +02:00
Knut Wannheden
501dc030e5 [jOOQ/jOOQ#8857] Spring Boot example should reference custom jOOQ
version
2019-06-26 12:36:48 +02:00
Knut Wannheden
3eba94c925 [jOOQ/jOOQ#8577] Also support NOT LIKE ANY and LIKE ALL
In addition to `LIKE ANY` and `NOT LIKE ALL` the inverse predicates `NOT
LIKE ANY` and `LIKE ALL` are now also supported.
2019-06-26 12:33:30 +02:00
Lukas Eder
c5a3ef1b52 [jOOQ/jOOQ#8857] Spring Boot example should reference custom jOOQ version 2019-06-26 12:32:31 +02:00
Lukas Eder
297868041e [jOOQ/jOOQ#8852] Support parsing empty IN lists 2019-06-26 11:59:46 +02:00
Lukas Eder
bc1704b637 [jOOQ/jOOQ#8856] Generate empty IN lists in SQL for H2 and SQLite 2019-06-26 11:59:29 +02:00
Lukas Eder
81b82a56b1 [jOOQ/jOOQ#8854] Make Tools.fields() methods generic 2019-06-26 10:55:22 +02:00
Lukas Eder
1fbc546b4a [jOOQ/jOOQ#8577] Add Field#likeAny() and #notLikeAll()
(work by @knutwannheden)
2019-06-26 10:38:14 +02:00
Knut Wannheden
c5c8d1d256 Fixed more Javadoc warnings in jOOQ-codegen and jOOQ-meta 2019-06-26 10:26:28 +02:00
Knut Wannheden
32a4bbfff4 Fix all Javadoc warnings in jOOQ
Mostly replaced `>` with `&gt;` in code examples.
2019-06-26 09:34:52 +02:00
Knut Wannheden
2addcf4b5d [jOOQ/jOOQ#8850] Informix: Support LikeEscapeStep#escape() 2019-06-25 12:10:30 +02:00
Knut Wannheden
b10d07e25c Organize some Java imports 2019-06-25 10:04:30 +02:00