add "num" in DATATYPE_MAP in order to generate %Numeric properties.#3
add "num" in DATATYPE_MAP in order to generate %Numeric properties.#3SylvainGuilbaud wants to merge 1 commit intointersystems:mainfrom
Conversation
| DATATYPE_MAP = {"str": "%VarString", "int": "%Integer", "bool": "%Boolean", "num":"%Numeric"} | ||
|
|
||
| DATATYPE_MAP_Parameters = {"str": "STRING", "int": "INTEGER", "bool": "BOOLEAN"} | ||
| DATATYPE_MAP_Parameters = {"str": "STRING", "int": "INTEGER", "bool": "BOOLEAN", "num":"NUMERIC"} |
There was a problem hiding this comment.
NUMERIC is not needed for Parameters:
https://docs.intersystems.com/healthconnectlatest/csp/docbook/DocBook.UI.Page.cls?KEY=ROBJ_parameter_syntax#ROBJ_parameter_syntax_parmtypes
There was a problem hiding this comment.
Thanks for the PR. The code change for Property DATATYPE_MAP looks reasonable.
Could you please remove the version bump in pyproject.toml? We usually handle version updates at release time rather than in individual feature/fix PRs. I also suspect this version change may have caused issues with the automated tests.
Also, could you add a small test before I merge this? It should be enough to extend an existing test with a new property using "num" and verify that it compiles successfully, i.e. that the automated tests run without errors.
when you overload a CallInterval property you raise the error :
ERROR #5478: Keyword signature error in xxx:Property:CallInterval, keyword 'Type' must be '%Library.Numeric' or its subclass
For instance, if an Adapter defines CallInterval property with "int" datatype the compilation fails, as this property is already defined as %Numeric in Ens.InboundAdapter.