Skip to content
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

Add docs on numeric data type #265

Merged
merged 1 commit into from
Jun 23, 2017
Merged

Add docs on numeric data type #265

merged 1 commit into from
Jun 23, 2017

Conversation

ssh24
Copy link
Contributor

@ssh24 ssh24 commented Jun 22, 2017

Description

The node.js driver for postgres returns a Numeric type value as a string to avoid data precision loss. Since we as the ORM simply just return back the result from the driver, we need to document this behaviour.

connect to #58

Copy link
Contributor

@b-admike b-admike left a comment

Choose a reason for hiding this comment

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

:shipit:

README.md Outdated

**Note**: Please be advised the [node.js driver for postgres](https://github.com/brianc/node-postgres) by default casts `Numeric` type as a string on `GET` operation. This is to avoid _data precision loss_ since `Numeric` types in postgres cannot be safely converted to JavaScript `Number`.

[Link to the corresponding driver issue](https://github.com/brianc/node-pg-types/issues/28).
Copy link
Member

Choose a reason for hiding this comment

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

maybe "For details, see the corresponding driver issue"?

README.md Outdated
@@ -363,6 +363,12 @@ See [LoopBack types](http://loopback.io/doc/en/lb3/LoopBack-types.html) for de
</tbody>
</table>

## Numeric Data Type

**Note**: Please be advised the [node.js driver for postgres](https://github.com/brianc/node-postgres) by default casts `Numeric` type as a string on `GET` operation. This is to avoid _data precision loss_ since `Numeric` types in postgres cannot be safely converted to JavaScript `Number`.
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we need the "please be advised".. but I'm not english expert :)

@ssh24 ssh24 force-pushed the add-docs-on-numeric-type branch from 8408763 to cdf51c3 Compare June 23, 2017 01:51
@ssh24 ssh24 added this to the Sprint 38 - Apex milestone Jun 23, 2017
@ssh24 ssh24 merged commit eeaa89e into master Jun 23, 2017
@ssh24 ssh24 deleted the add-docs-on-numeric-type branch June 23, 2017 02:32
@ssh24 ssh24 removed the #review label Jun 23, 2017
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.

4 participants