Commit Graph

761 Commits

Author SHA1 Message Date
Lukas Eder
53f7cc0c79 [jOOQ/jOOQ#9601] Add <includeSystemIndexes/> 2019-12-03 09:39:00 +01:00
Lukas Eder
c7378bbc63 [jOOQ/jOOQ#9600] WIP 2019-11-28 14:04:25 +01:00
Knut Wannheden
791c69a9c7 [jOOQ/jOOQ#9442] Add sequence flags to code generator
Adds an overload factory method `Internal#createSequence()` which
accepts the sequence flags as individual parameters. The Java and Scala
code generators now generate code using this factory method.

So far only the `H2Database` knows how to supply the sequence flags to
the code generator. Other dialects supporting sequences will follow in
follow-up commits.

Also note that support for the `ORDER` flag will be added separately
(see jOOQ/jOOQ#9346).
2019-11-27 14:14:42 +01:00
Knut Wannheden
a2674732c9 [jOOQ/jOOQ#9565] Fix code generator for H2 inline checks 2019-11-27 11:49:59 +01:00
Knut Wannheden
fcc90d0c5a [jOOQ/jOOQ#9442] Code generator uses factory method for sequences
Instead of generating code which directly uses the `SequenceImpl`
constructor, the generator now emits code using a static factory method
in the `Internal` factory class.

Also removes duplicate H2 dependency from `jOOQ/pom.xml`.
2019-11-27 10:04:08 +01:00
Lukas Eder
57121c96e2 [jOOQ/jOOQ#7639] Add code generation support for CHECK constraints 2019-11-19 12:26:15 +01:00
Lukas Eder
ba7a030c82 [jOOQ/jOOQ#9565] Generate check clause in XMLGenerator 2019-11-19 10:18:18 +01:00
Lukas Eder
cd71da22f9 [jOOQ/jOOQ#8967] Generator outputs duplicate method (not compilable) 2019-11-15 13:50:41 +01:00
Lukas Eder
1f9fb4dfdb [jOOQ/jOOQ#8545] WIP 2019-11-08 16:43:58 +01:00
Lukas Eder
941bf0ed4a [jOOQ/jOOQ#9520] Log info message when a forcedType never matches 2019-11-08 13:55:55 +01:00
Lukas Eder
6b174bfbe0 [jOOQ/jOOQ#6497] Fixed NPE regression when <generate/> element is absent 2019-10-01 09:15:54 +02:00
Lukas Eder
3633b53f1e [jOOQ/jOOQ#6497] Add LocalDateAsLocalDateTimeBinding to make <javaTimeTypes/> and <dateAsTimestamp/> work together 2019-09-30 09:41:01 +02:00
Lukas Eder
77802eeb7b [jOOQ/jOOQ#5714] Change <javaTimeTypes/> default value to true 2019-09-27 14:55:37 +02:00
Lukas Eder
f1568d475a [jOOQ/jOOQ#9276] Consistently use same line terminators in generator
Also for the import list the Java / Scala generators now use the
configured line terminator rather than a hardcoded  terminator.
2019-09-26 10:42:28 +02:00
Lukas Eder
d18b17d44d [jOOQ/jOOQ#9150] Compilation error in generated code when Oracle OBJECT type contains index_of(varchar2) member procedure 2019-09-03 17:43:35 +02:00
Knut Wannheden
d27dbf4117 Preparing master for 3.13 release cycle 2019-08-29 16:12:59 +02:00
Lukas Eder
0f5b8799b9 [jOOQ/jOOQ#9048] Delete module-info.java.invalid files 2019-08-16 14:02:45 +02:00
Lukas Eder
854375dbcf [jOOQ/jOOQ#7789] Revert change
The jOOQ 3.12 Open Source Edition will continue to support Java 8. The only things we gain from the JDK 11 dependency is:

- Updated logic for reflection when mapping into proxied default methods (that stuff has changed completely in JDK 9). This is a regression, which we can live with. The workaround is to write a custom
- Explicit dependency on the JDK 9  API, for which we provide a Java 8 compatible alternative via reactive streams anyway.
- JDBC 4.3 compatibility (mostly sharding). We currently don't use that yet.

We're not even using  internally, outside of a few integration tests. So, we'll postpone the JDK 11 *requirement* (while supporting it nonetheless) to a later release, e.g. 3.13. We'll observe market share shifts. Currently Java 11's market share is a bit of a disappointment, so making it a requirement might be premature.
2019-07-26 15:18:18 +02:00
Kaan Ozdokmeci
e8e230ae2c make generatePojoMultiConstructor protected inline with it's javadoc 2019-07-23 19:47:08 +03:00
Lukas Eder
cacc3e5a7c [jOOQ/jOOQ#8932] Use diamond operator in jOOQ code 2019-07-11 11:55:51 +02:00
Lukas Eder
f43815aa73 [jOOQ/jOOQ#8925] Add DAO.fetchRangeOf(Field<Z>, Z, Z) 2019-07-10 15:05:52 +02:00
Knut Wannheden
8b04f08e15 [jOOQ/jOOQ#8919] Implement formatting in MiniJAXB
The formatting logic is encapsulated by the new internal `XMLBuilder`
class which also required a new internal interface `XMLAppendable` which
is implemented by all XJC generated classes.

The XJC plugin was modified accordingly and all code was regenerated.

Also note that the `MiniJAXB` class was moved to package
`org.jooq.util.jaxb.tools`.
2019-07-10 11:26:58 +02:00
Knut Wannheden
9020e4eb42 [jOOQ/jOOQ#8914] Consistently use MiniJAXB 2019-07-09 14:34:17 +02:00
lukaseder
1b0113cc25 [jOOQ/jOOQ#8905] Use GeneratorWriter.encoding() instead of "UTF-8" 2019-07-05 13:46:15 +02:00
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
514f2eda6d [jOOQ/jOOQ#5412] Reverted the feature 2019-07-03 15:27:09 +02:00
Lukas Eder
06b3e0aecd [#8863] Fix for ScalaGenerator 2019-07-02 09:43:07 +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
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
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
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
Lukas Eder
5aee8a9b5d [jOOQ/jOOQ#5412] Generate a Record from POJO unmapper on generated
records
2019-06-18 17:04:54 +02:00
Lukas Eder
45c298a4bc [jOOQ/jOOQ#5412] Generate a Record to POJO mapper on generated records 2019-06-18 16:48:44 +02:00
Lukas Eder
7f75f47c29 [jOOQ/jOOQ#8781] Improve error msg when org.jooq.util class not found
Users keep running into issues when they don't see why their
org.jooq.util classes from the code generator cannot be found. This
change helps them better find the new package qualification of types in
the jOOQ-meta and jOOQ-codegen modules.
2019-06-13 12:20:16 +02:00
Lukas Eder
09d3a4d26e [#8685] Avoid generating unnecessary {@inheritDoc} 2019-05-27 10:48:21 +02:00
Knut Wannheden
35fc136643 [#2059] Add MemSQL support
Implement support for new dialect SQLDialect#MEMSQL. Excluded from the
support are stored procedures, MemSQL specific DDL keywords, MemSQL
specific DML (like REPLACE), and for the time being also the PIVOT
clause (see #8643).

Approved-by: Lukas Eder
2019-05-21 14:38:06 +02:00
Lukas Eder
fce9626b13 [jOOQ/jOOQ#8615] Missing NOTICE file from commons-lang 2019-05-21 12:23:17 +02:00
lukaseder
1116644cde [#8550] Improve formatting of generated table-level JPA annotations 2019-04-18 11:23:35 +02:00
lukaseder
65d779065f [#8536] Missing constraint name in generated @UniqueConstraint annotation 2019-04-18 10:56:38 +02:00
lukaseder
97cab67e4a [#8535] Generate @UniqueConstraint annotation instead of @Column(unique = true)
The current distinction is confusing, and if redundant uniqueness information is present, then Hibernate ignores the @UniqueConstraint name. Hence, we will only generate the @UniqueConstraint annotation
2019-04-17 11:26:59 +02:00
lukaseder
1673a1b971 [#6234] The encoded newline characters must be decoded 2019-04-13 18:37:54 +02:00
Knut Wannheden
df2ec439bc [#6971] Add <onError/> to generator's <configuration/>
Using the new <onError/> (which accepts the values FAIL (default), LOG,
and SILENT) the generator's behavior on an encountered exceptions can be
controlled.
2019-04-10 12:20:17 +02:00
lukaseder
2785bc84ae [#8491] Remove unnecessary marker tokens in source code 2019-04-05 11:52:34 +02:00
lukaseder
a088bec1af [#8463] Add <includeCheckConstraints/> flag to code generator 2019-03-29 15:08:59 +01:00
lukaseder
8f7e2f0dbf [#8465] Add a new <logSlowResultsAfterSeconds/> code generation flag 2019-03-29 15:00:41 +01:00
lukaseder
2ea2d93736 [#8447] Add <sqlMatchesPartialQualification> 2019-03-26 10:54:54 +01:00
lukaseder
94a59f50a8 [#8407] Add code generation configuration flag to set Connection.setAutoCommit() 2019-03-14 14:38:28 +01:00
lukaseder
d79d634963 [#7719] Add code generation flag to treat MySQL TINYINT(1) as BOOLEAN 2019-03-07 12:53:51 +01:00