feat/descriptor #35
No reviewers
Labels
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
DenktMit-OSS/lt-crudular!35
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/descriptor"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Add descriptors as a first class citizen of CRUDular. With them you can add descriptive properties to be exposed togeher with your business key properties.
@ -0,0 +1,28 @@package descfix.nonoptPackage name looks strange
Correctness, from the spec axis: - JooqConfigurer.descriptorCells resolved only the descriptor's own conventional UDT name, but verification now accepts a view's descriptor stored as its base's type. That combination left the cells empty and decoded a base-stored value *unconverted* - an enum arriving as raw text. It now walks the view chain the same way verification does. - Dropped the id identity check: jOOQ's `identity()` is equally true of `serial` and GENERATED BY DEFAULT, both of which accept the supplied value, so it fired on schemas that work - and its own advice ("use GENERATED BY DEFAULT") would not have silenced it. Nothing in the metadata separates ALWAYS from BY DEFAULT. Standards axis: - ASCII-only: 45 authored lines carried en/em dashes or ellipsis characters. Pre-existing prose in the same files is left byte-for-byte. - One case-insensitive `udt(name)` lookup replaces three call sites that disagreed about case (`udtsByName[...]` vs an `equals(ignoreCase = true)` scan), plus one `componentUdtName` for the repeated qualified-type-name strip. - Split a 163-char line; renamed the `nullability` fixture to `note`, since four column-level checks now share it and only one is about nullability; corrected a fixture KDoc describing packages that do not exist. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>@ -47,0 +62,4 @@// unresolved for verification to report - never dropped on the quiet.val found = findSubclasses<Descriptor<*, *>>(*basePackages.toTypedArray()).associateWith { it.descriptorEntityType() }unresolvedDescriptors = found.filterValues { it == null || it !in byEntityType }descriptors = found.mapNotNull { (dClass, entityType) -> entityType?.let { byEntityType[it] }?.let { dClass.metaDescriptor(it) } }If elements returning null inside of mapNotNull they should appear in unresolvedDescriptors?
@ -47,0 +66,4 @@// One descriptor per entity is enforced by verification; until the model is fixed the one first by class name// is wired, so the same model behaves the same on every run.descriptors.groupBy { it.entityType }.forEach { (entityType, ds) ->byEntityType[entityType]?.descriptor = ds.minBy { it.type.name }Shouldd be there not a mechanism to have more control over this? and min by type name should only be default
Only one descriptor per Entity is allowed right now. This code is here to be able to verify a violation