Commit Graph

1308 Commits

Author SHA1 Message Date
Lukas Eder
ca9e7a311d [jOOQ/jOOQ#644] Fix wrong import of non-existing interface
When we have an implicit Converter, getJavaType() unfortunately produces
an import even if the type is ultimately not used. This should probably
be fixed separately as I keep running into this problem.
2024-09-06 16:53:16 +02:00
Lukas Eder
99dd011913 [jOOQ/jOOQ#644] [jOOQ/jOOQ#17189] Lots of ScalaGenerator improvements
- Support POJO hierarchies (use constructor args instead of properties)
- Correct overrides of interfaces
- Avoid covariant Array[X] overrides (that's Java only)
2024-09-06 13:29:29 +02:00
Lukas Eder
e45a9eaf1f [jOOQ/jOOQ#17196] ScalaGenerator produces wrong code when generated interfaces (traits) extend multiple other interfaces 2024-09-06 09:53:30 +02:00
Lukas Eder
f389ed3645 [jOOQ/jOOQ#644] immutablePojo type hierarchy support 2024-09-06 09:31:35 +02:00
Lukas Eder
a2490eb03c [jOOQ/jOOQ#644] Add matcher strategies for the record types 2024-09-05 16:14:36 +02:00
Lukas Eder
cb80ce4672 [jOOQ/jOOQ#644] Don't generate Scala POJO hierarchies yet 2024-09-05 14:33:36 +02:00
Lukas Eder
82d210d0d4 [jOOQ/jOOQ#644] KotlinGenerator fixes for POJO hierarchy
In Kotlin, classes and attributes have to be open to be overridden, and their overriding attributes have to declare this. Also, the super constructor must be called explicitly
2024-09-05 14:00:39 +02:00
Lukas Eder
1cdf577120 [jOOQ/jOOQ#644] Support POJO type hierarchy
When using <interfaces/>, the various setters and constructors must share conversion logic, ideally in a new private method per UDT column / attribute
2024-09-05 13:28:51 +02:00
Lukas Eder
054c7f6224 [jOOQ/jOOQ#644] Support POJO type hierarchy
This first draft will omit calls to super.xyz() in various POJO type hierarchy levels, assuming the super type implementation (and its attributes) can be ignored completely given that all methods are overridden. If this assumption isn't true, we can still fix things, but I prefer not to complicate *everything* unless it's necessary.

Some implementations are still wrong as they should downcast known supertypes to their subtypes, e.g. constructors when accepting <interfaces/> types.
2024-09-05 12:03:33 +02:00
Lukas Eder
265798730f [jOOQ/jOOQ#644] [jOOQ/jOOQ#8209] Invalid code when generating both POJOs and interfaces with UDTs 2024-09-04 18:15:44 +02:00
Lukas Eder
8094b21cf4 [jOOQ/jOOQ#17179] Fix typo 2024-09-04 15:44:50 +02:00
Lukas Eder
18f2f24dae [jOOQ/jOOQ#17180] Record constructor should accept embeddable interface
If <interfaces/> is set to true, then the Record constructor should accept the interface type of an embeddable (or UDT), not the Record type, just like the setter.

This includes:

- [jOOQ/jOOQ#17179] Bad replacing EmbeddableRecord setter generated when <interfaces/> is active
2024-09-04 15:33:03 +02:00
Lukas Eder
fbee6b2824 [jOOQ/jOOQ#17165] Embeddables replacing their fields should replace
their fields also in generated POJOs and interfaces
2024-09-03 11:42:20 +02:00
Lukas Eder
e39a03962c [jOOQ/jOOQ#17169] Overload resolution ambiguity in KotlinGenerator
generated code for embeddable domains

This includes:

[jOOQ/jOOQ#11716] Fix this also for KotlinGenerator
2024-09-02 15:11:52 +02:00
Lukas Eder
3b10066935 [jOOQ/jOOQ#11716] Using embedded domains with POJO generation results in duplicate getters 2024-09-02 13:57:55 +02:00
Lukas Eder
2766f16ce5 [jOOQ/jOOQ#17146] Unsupport ScalaGenerator in OSS edition 2024-08-30 10:15:32 +02:00
Lukas Eder
54dbdcffa4 [jOOQ/jOOQ#644] Fix compilation error in RecordType setters/getters
RecordType setters/getters should use the Mode.DEFAULT for the attribute types, not the Mode.RECORD_TYPE, in case a hierarchical record references a flat record!
2024-08-29 16:38:50 +02:00
Lukas Eder
86d75b208e [jOOQ/jOOQ#12180] Fix typo 2024-08-29 15:55:40 +02:00
Lukas Eder
172a0e9b3d [jOOQ/jOOQ#12180] Add Scala3Generator 2024-08-29 13:37:29 +02:00
Lukas Eder
89a4785f30 [jOOQ/jOOQ#644] Generated RECORD_TYPE classes don't need to be generic 2024-08-29 10:21:29 +02:00
Lukas Eder
dba849cf5d [jOOQ/jOOQ#644] Generated RECORD_TYPE classes don't need to be generic 2024-08-29 10:19:59 +02:00
Lukas Eder
d15f9f0d04 [jOOQ/jOOQ#644] Revert NOT INSTANTIABLE support for now
There are numerous problems in jOOQ's internals, which assume that a UDTRecord is always non-abstract (e.g. to access the UDT qualifier via reflection). This cannot be avoided, for now.
2024-08-28 15:43:06 +02:00
Lukas Eder
e7d82f6764 [jOOQ/jOOQ#644] Add support for Oracle TYPE .. UNDER type hierarchies
This includes:

- Add support for NOT INSTANTIABLE
- Handle synonym references
2024-08-28 13:25:50 +02:00
Lukas Eder
175380c1dc [jOOQ/jOOQ#644] Add support for Oracle TYPE .. UNDER type hierarchies
This includes:

- [jOOQ/jOOQ#11371] Generate UDT.getSupertype() and UDT.getSubtypes()
2024-08-28 12:56:34 +02:00
Lukas Eder
d57dcdbb85 [jOOQ/jOOQ#17099] [jOOQ/jOOQ#17117] Code generation escaping issues
This includes:

- [jOOQ/jOOQ#17099] KotlinGenerator contains incomplete list of Kotlin forbidden identifier characters
- [jOOQ/jOOQ#17117] Bad code generated for enum values containing backslash character
2024-08-21 14:18:18 +02:00
Lukas Eder
044cebb85b [jOOQ/jOOQ#17063] Update DataType.isXYZ() Javadoc with new types 2024-08-14 11:40:55 +02:00
Lukas Eder
3cade0204f [#16988] Correctly name Apache-2.0 everywhere 2024-07-29 13:00:52 +02:00
Lukas Eder
4f50ef2c55 [#16988] Correctly name Apache-2.0 everywhere 2024-07-29 12:53:09 +02:00
Lukas Eder
594823bb6a [jOOQ/jOOQ#16825] The code generation initScript property should be able to read from the file system 2024-06-14 08:59:47 +02:00
Lukas Eder
6626120db8 Revert "[jOOQ/jOOQ#16716] Generate MyTable.let(Function<? super MyTable,
? extends R>) utilities on generated tables"
2024-05-27 10:43:57 +02:00
Lukas Eder
60a9153cb2 [jOOQ/jOOQ#16716] Generate MyTable.let(Function<? super MyTable, ? extends R>) utilities on generated tables 2024-05-24 18:42:51 +02:00
Lukas Eder
5796838512 [jOOQ/jOOQ#16691] Work around KT-68407 compiler error in generated AbstractSpringDAOImpl class in kotlin 2.0 2024-05-23 09:25:46 +02:00
Lukas Eder
8e8b24ae57 [jOOQ/jOOQ#16670] Add jakarta.annotation.Generated as possible GeneratedAnnotationType 2024-05-10 08:53:28 +02:00
Lukas Eder
b210700fd2 [jOOQ/jOOQ#16666] Add SQLite support for GROUP_CONCAT(DISTINCT ..) 2024-05-09 10:46:13 +02:00
Lukas Eder
b0d80284f4 [jOOQ/jOOQ#15723] Generate comments also on other PG object types
This includes:

- [jOOQ/jOOQ#16600] Add a <commentsOnDomains/> flag
- [jOOQ/jOOQ#16601] Add more <comment/> support to jooq-meta.xsd
2024-04-26 15:15:48 +02:00
Lukas Eder
dd6b16512e [jOOQ/jOOQ#15732] Add code generation support for arrays 2024-03-21 09:03:07 +01:00
Lukas Eder
1338a28c75 [jOOQ/jOOQ#16418] Add <ignoreUnused/> flag to a few code generation
elements, for better reuse
2024-03-08 15:38:33 +01:00
Lukas Eder
8bc9fa9944 [jOOQ/jOOQ#7539] Support for SQLDialect.CLICKHOUSE 2024-03-08 15:20:22 +01:00
Lukas Eder
f7fe2b866a [jOOQ/jOOQ#16002] Add new code generation flag to omit @NotNull / @Nullable annotations on write-only nullable types 2024-03-01 16:44:51 +01:00
Lukas Eder
7e786dc3d4 [jOOQ/jOOQ#579] Whitespace fix 2024-02-26 13:47:35 +01:00
Lukas Eder
dfcaa4c3aa [jOOQ/jOOQ#579] Auto alias unnamed field expressions in derived tables 2024-02-26 13:33:21 +01:00
Lukas Eder
eb6150893d [jOOQ/jOOQ#7668] Unescape kotlin/scala identifiers 2024-02-22 13:45:01 +01:00
Lukas Eder
f72521b209 [jOOQ/jOOQ#7668] DAO fetch methods should use GeneratorStrategy::getJavaMemberName with Mode.DAO instead of getJavaClassName 2024-02-22 11:44:53 +01:00
Lukas Eder
c068decd97 [jOOQ/jOOQ#12243] Fix code generation regression 2024-02-14 10:41:52 +01:00
Lukas Eder
9e84924702 [jOOQ/jOOQ#16254] JavaGenerator doesn't generate serialVersionUID in
Path classes
2024-02-12 09:29:44 +01:00
Lukas Eder
3eaf3b1729 [jOOQ/jOOQ#16135] Add the invisibleColumnsAsHidden flag 2024-01-25 14:22:57 +01:00
Lukas Eder
2b5bfe45c7 Re-generate code 2024-01-24 13:29:34 +01:00
Lukas Eder
4acfafc71b [jOOQ/jOOQ#13411] Exclude hidden columns from records/pojos/interfaces etc. 2024-01-19 17:45:09 +01:00
Lukas Eder
4179d2eb42 [jOOQ/jOOQ#13411] Add jOOQ and jOOQ-meta API for hidden columns 2024-01-19 15:42:28 +01:00
Lukas Eder
e00feb08ec [jOOQ/jOOQ#16093] Add matcher strategies for method overrides 2024-01-17 14:01:19 +01:00