Commit Graph

805 Commits

Author SHA1 Message Date
Lukas Eder
123d979ecd [jOOQ/jOOQ#10196] GeneratorWriter should auto-indent generated code 2020-05-14 14:01:42 +02:00
Lukas Eder
916fac56b6 [jOOQ/jOOQ#10195] GenerationTool should execute SHUTDOWN on HSQLDB connections 2020-05-14 11:03:42 +02:00
Lukas Eder
66346d35f1 [jOOQ/jOOQ#6248] WIP 2020-05-13 14:35:54 +02:00
Lukas Eder
37ec8d3a34 [jOOQ/jOOQ#6248] WIP 2020-05-13 10:27:35 +02:00
Lukas Eder
6b0ea7fe4e [jOOQ/jOOQ#10090] Add a <generatedAnnotationDate/> flag to allow for turning off generating @​Generated.date() 2020-04-20 11:42:56 +02:00
Lukas Eder
c2df94da47 [jOOQ/jOOQ#10013] Add <constructorPropertiesAnnotation/> to generate @ConstructorProperties on pojos and records 2020-03-31 11:27:08 +02:00
Lukas Eder
5380ed5ec1 [jOOQ/jOOQ#10007] "constant string too long" in generated code when view
source code exceeds 64KB
2020-03-30 14:37:11 +02:00
Lukas Eder
f3ff999494 Whitespace change 2020-03-18 13:33:31 +01:00
Lukas Eder
d1e4adcfb4 [jOOQ/jOOQ#6456] Remove extra newline in POJOs 2020-03-13 13:10:19 +01:00
Lukas Eder
75177c06bf [jOOQ/jOOQ#9959] Code generator should produce TIMESTAMP(precision) calls instead of TIMESTAMP.precision(precision) 2020-03-13 12:18:47 +01:00
Lukas Eder
c0490c5f4b [jOOQ/jOOQ#9903] Changing getJavaClassName() for Mode.ENUM in DefaultGeneratorStrategy generates invalid code 2020-03-02 11:18:49 +01:00
Lukas Eder
e87b2eaa21 [jOOQ/jOOQ#6456] Generate comments also on POJOs 2020-02-28 16:11:29 +01:00
Knut Wannheden
c56c8c28d1 [jOOQ/jOOQ#6456] POJO setter/getter Javadoc generation 2020-02-28 15:03:54 +01:00
Lukas Eder
4a63527e41 [jOOQ/jOOQ#9849] Compilation error in generated code for check constraints containing bad escape sequences 2020-02-21 10:39:39 +01:00
Lukas Eder
b5306ca559 Cosmetic fixes 2020-02-14 10:44:55 +01:00
Lukas Eder
330dac76de Release 3.14.0-SNAPSHOT 2020-02-12 11:29:19 +01:00
Lukas Eder
32c536328c [jOOQ/jOOQ#9819] Add support for INFORMATION_SCHEMA.VIEWS in jooq-meta.xsd 2020-02-11 16:06:16 +01:00
Lukas Eder
20f3fce616 [jOOQ/jOOQ#9805] Generate view source code with generated views 2020-02-11 15:17:24 +01:00
Lukas Eder
b0aab86afa [jOOQ/jOOQ#9801] Make TableOptions available through InformationSchema 2020-02-10 12:26:31 +01:00
Lukas Eder
92de670f5d [jOOQ/jOOQ#9807] Apply Configuration.onError flag also to SQL errors from AbstractDatabase 2020-02-07 10:33:51 +01:00
Lukas Eder
800c2a44d7 [jOOQ/jOOQ#9799] Make TableOptions available through code generation 2020-02-06 15:36:00 +01:00
Lukas Eder
70fec238a0 [jOOQ/jOOQ#9796] Generated annotation should produce HTTPS link to jOOQ website 2020-02-06 11:04:31 +01:00
Lukas Eder
3af4c5f6ec [jOOQ/jOOQ#9758] Generated constraint names should not be table prefixed
in meta data (PostgreSQL fix)
2020-01-24 14:14:54 +01:00
Lukas Eder
5691ad7cb2 [jOOQ/jOOQ#9758] Generated constraint names should not be table prefixed in meta data 2020-01-24 14:02:48 +01:00
Knut Wannheden
8e613d14a9 [jOOQ/jOOQ#8953] Generate Internal#createQueue() call into Queues.java
The code generator will now generate a call to the new
`Internal#createQueue()` factory method instead of directly calling the
`QueueImpl` constructor.
2020-01-22 17:34:15 +01:00
Knut Wannheden
9e403efc7c [jOOQ/jOOQ#8953] No generic type parameter in generated createSequence()
In the generated `Sequences.java` files the generic type parameter in
the `Internal#createSequence()` calls can be omitted.
2020-01-22 17:25:29 +01:00
Lukas Eder
c2eb2e0dc7 [jOOQ/jOOQ#9734] Add <nonnullAnnotation/> and <nullableAnnotation/> 2020-01-15 16:13:42 +01:00
Lukas Eder
2323b2a3e1 [jOOQ/jOOQ#9733] Add <generatedNonnullAnnotationType/> and <generatedNullableAnnotationType/> 2020-01-15 14:26:27 +01:00
Lukas Eder
54e8a53628 [jOOQ/jOOQ#9732] Change default value of <generatedAnnotation/> to
"false"
2020-01-15 13:57:20 +01:00
Lukas Eder
45097fd05d [jOOQ/jOOQ#8677] Log warning when file based databases have invalid <jdbc/> configurations 2020-01-14 17:23:57 +01:00
Lukas Eder
cff813a73e [jOOQ/jOOQ#9727] Add configuration/basedir to resolve relative paths in
code generator
2020-01-14 15:41:37 +01:00
Lukas Eder
36981a1198 [jOOQ/jOOQ#9697] Full identifier qualification in generated code when <globalObjectReferences> is turned off 2019-12-23 10:53:55 +01:00
Knut Wannheden
91fde41fb9 [jOOQ/jOOQ#9272] Avoid fully qualified class references when possible
In the generated `CatalogImpl` subclasses the static fields representing
the schemas of the catalog typically don't need a fully qualified class
reference in the initializer expression, since the Java type is imported
already.

Additionally the Javadoc comment of the field representing the default
schema (if any) will now also include the schema's name (before it was
missing).
2019-12-20 11:19:04 +01:00
Knut Wannheden
05a37398f0 [jOOQ/jOOQ#9272] Fix Javadoc of default catalog and schema singletons
Fixes the Javadoc comment of the default catalog and schema singletons
generated into the `CatalogImpl` and `SchemaImpl` subclasses. For the
default catalog and schema the name was always empty.
2019-12-20 11:05:24 +01:00
Knut Wannheden
171637eaed [jOOQ/jOOQ#9272] Avoid fully qualified class references when possible
In the generated `SchemaImpl` subclasses the static fields representing
the tables of the schema typically don't need a fully qualified class
reference in the initializer expression, since the Java type is imported
already.
2019-12-20 10:39:12 +01:00
Lukas Eder
e0cc5a4763 [jOOQ/jOOQ#9696] Add a new <generateGlobalIndexReferences/> flag
- This also fixes [jOOQ/jOOQ#9582]
2019-12-19 17:39:37 +01:00
Lukas Eder
a9df7649b1 [jOOQ/jOOQ#9685] Generate.globalTableReferences should not impact what
is returned by Schema#getTables()
2019-12-19 10:52:33 +01:00
Knut Wannheden
fb0a53b200 [jOOQ/jOOQ#9272] Simplify generated Schema and Catalog classes
The genereated `SchemaImpl` and `CatalogImpl` subclasses will only
declare methods like `getSchemas0()` and `getTables0()` when necessary.
I.e. when the number of returned definitions exceeds 500.
2019-12-18 17:29:01 +01:00
Lukas Eder
349b73f540 [jOOQ/jOOQ#9663] Regenerated test code 2019-12-12 18:13:14 +01:00
Lukas Eder
f1bbecc136 [jOOQ/jOOQ#9663] Add code generator support for NOT ENFORCED constraint flag
This depends on [jOOQ/jOOQ#9672] Add ConstraintDefinition
2019-12-12 17:34:44 +01:00
Knut Wannheden
b21a8c5f38 [jOOQ/jOOQ#9442] Support BigInteger for sequence flags
Java (and Scala) generator now also supports sequence flags where the
value is of type `BigInteger`.
2019-12-11 11:42:19 +01:00
Knut Wannheden
aa963f3010 [jOOQ/jOOQ#9629] Add "sequenceFlags" option to code generator
The `<generate>` element now has a `<sequenceFlags>` element which can
be used to disable the sequence flags generation, which is enabled by
default.
2019-12-05 14:29:09 +01:00
Knut Wannheden
791ed71c5b [jOOQ/jOOQ#9603] Change names to conform with SQL standard
The names of the XML elements in `jooq-meta-3.13.0.xsd` corresponding to
sequence flags have been changed to conform with the SQL standard.

Additionally the type of the numeric sequence flags have been changed
from `Long` to `BigInteger` and consequently also in other APIs from
`Long` to `Number`.
2019-12-05 13:51:48 +01:00
Knut Wannheden
9940a56afa [jOOQ/jOOQ#9603] Support sequence flags in jooq-meta.xsd
Sequence flags are now also supported in the jooq-meta.xsd model and
everywhere where this is used.
2019-12-04 17:17:03 +01:00
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