SAP-samples / hana-developer-cli-tool-example

Learn how to build a developer-centric SAP HANA command line tool, particularly designed to be used when performing SAP HANA development in non-SAP tooling (for example from VS Code).
Apache License 2.0
90 stars 24 forks source link

Calculation views proxies #83

Closed mvmanov closed 1 year ago

mvmanov commented 2 years ago

Hi, I am using the inspectView command to generate a cds proxy for a calculation view. Is it possible for the proxy to be marked with the @cds.persistence.calcview and proper handle calculation view input parameters and keys? Right now all fields are marked as keys and the input parameters are ignored.

Thanks, Milen

jung-thomas commented 2 years ago

There is currently no specialized logic in this tool for Calculation Views. It only reads and processes what it can learn at the SQL Level from the VIEWS API view. So, it can see the Calculation View as a Column View only. What you are describing would require going after additional Calculation View specific metadata (which might also require some different logic between HDI and Repo). But this is something we could consider in the future.

jung-thomas commented 2 years ago

I just published a first version of support for Calculation Views in inspectView. Version 3.202209.1. It will now set the annotation, keys and descriptions from the Calculation View metadata instead of the SQL Column View. It will take a little more time to add the input parameters. Maybe this Friday I can have a look at that part.

jung-thomas commented 1 year ago

It took way too long to get back to this but I've finally finished this item and added support view parameters.