[PR #4052] dbeaver/pro#7769 fix properties mapping for enums #4637

Closed
opened 2026-03-07 21:19:12 +03:00 by kerem · 0 comments
Owner

Original Pull Request: https://github.com/dbeaver/cloudbeaver/pull/4052

State: closed
Merged: Yes


Closes https://github.com/dbeaver/pro/issues/7769

What changed

Now, values inside ObjectPropertyInfo (validValues and defaultValue) can be objects with { displayName, value }.

I created two additional functions to use when iterating over validValues or when getting a property value without considering the data type as getObjectPropertyValue fn relies on property type (for example, in the properties table).
Also there is a custom interface for object property so we can change type there and get type errors in our codebase. Previously there were not errors as types were always any.

However, it’s becoming clear that ObjectPropertyInfo is getting more complex to work with. Maybe we should consider implementing an ObjectViewerPropertyMapper class and use it like ObjectViewerPropertyMapper(property).defaultValue. If we always map properties through this object, the behavior would be more predictable in theory.

**Original Pull Request:** https://github.com/dbeaver/cloudbeaver/pull/4052 **State:** closed **Merged:** Yes --- Closes https://github.com/dbeaver/pro/issues/7769 What changed Now, values inside ObjectPropertyInfo (validValues and defaultValue) can be objects with { displayName, value }. I created two additional functions to use when iterating over validValues or when getting a property value without considering the data type as getObjectPropertyValue fn relies on property type (for example, in the properties table). Also there is a custom interface for object property so we can change type there and get type errors in our codebase. Previously there were not errors as types were always any. However, it’s becoming clear that ObjectPropertyInfo is getting more complex to work with. Maybe we should consider implementing an ObjectViewerPropertyMapper class and use it like ObjectViewerPropertyMapper(property).defaultValue. If we always map properties through this object, the behavior would be more predictable in theory.
kerem 2026-03-07 21:19:12 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cloudbeaver#4637
No description provided.