Skip to content

Support number props in spatial and temporal types #350

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

Merged
merged 1 commit into from
Apr 12, 2018

Conversation

lutovich
Copy link
Contributor

By default, driver exposes integer values as instances of Integer class. This class can represent integer values larger than Number.MAX_SAFE_INTEGER without loss of precision. Driver can be forced to return native numbers using disableLosslessIntegers config option.

This PR makes spatial and temporal types support disableLosslessIntegers. All exposed integer properties will be of type number when this config option is set to true. Internal conversions for temporal types still use Integer to not lose precision.

By default, driver exposes integer values as instances of `Integer`
class. This class can represent integer values larger than
`Number.MAX_SAFE_INTEGER` without loss of precision. Driver can be
forced to return native numbers using `disableLosslessIntegers`
config option.

This commit makes spatial and temporal types support
`disableLosslessIntegers`. All exposed integer properties will be of
type `number` when this config option is set to `true`. Internal
conversions for temporal types still use `Integer` to not lose
precision.
@lutovich lutovich requested a review from ali-ince April 11, 2018 11:18
Copy link
Contributor

@ali-ince ali-ince left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@ali-ince ali-ince merged commit 9aeafbe into neo4j:1.6 Apr 12, 2018
@lutovich lutovich deleted the 1.6-temporal-spatial-native-numbers branch April 12, 2018 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants