Skip to content

return object attributes as int if metadata says it can be expressed as int #99

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
leo-b opened this issue Nov 15, 2022 · 2 comments
Closed
Labels
enhancement New feature or request patch available

Comments

@leo-b
Copy link

leo-b commented Nov 15, 2022

Currently when fetching objects, scale and precision of numbers is not considered and NUMBER attributes are always returned as python floats, even if scale is 0 and the NUMBER could be better represented as int.

Please add the same logic for objects depending on metadata as used when fetching numbers.

See also discussion #88

@leo-b leo-b added the enhancement New feature or request label Nov 15, 2022
anthony-tuininga added a commit that referenced this issue Nov 24, 2023
now returned as integers if the precision and scale allow for it -- in
the same way that numbers are fetched from the database (#99).
@anthony-tuininga
Copy link
Member

I have pushed a patch that should implement this enhancement. If you are able to build from source you can verify that it works for you.

@anthony-tuininga
Copy link
Member

The patch has been included in version 2.0.0 which was just released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request patch available
Projects
None yet
Development

No branches or pull requests

2 participants