mendix / database-connector

https://appstore.home.mendix.com/link/app/2888/Mendix/Database-Connector
Apache License 2.0
9 stars 25 forks source link

Feature. Replace instance object by generic type argument #16

Closed zubivan closed 4 years ago

zubivan commented 5 years ago

Instead of requiring the user to create an object as a placeholder for the return type we are leveraging Mendix generics, aka Entity Types (https://docs.mendix.com/refguide/java-actions#2-2-1-entity-type).

This should eliminate the need to create an extra object just to figure out the return type information.

Before: image

After: image

Overall changes:

Introduced a new Java Action - Execute_Query_New and marked Execute_Query as legacy, so our existing users won't get compilation errors when updating to the new version.

The main difference between the two is illustrated on this screenshot: image

we are replacing the type parameter (which requires an object to be created) with entity type parameter that allows in place selection of a generic type.

zubivan commented 5 years ago

Please mark as WIP, I'll add a migration path for the old version.

zubivan commented 5 years ago

So, now instead of introducing a breaking change I introduced a new action and marked the old one as legacy. So at least for those who are using the module upgrade won't be painful.

image

passalaqua commented 4 years ago

This looks good, code-wise, but there are a few things we still need to do before releasing, namely: