不要怂,就是干,撸起袖子干!

Commit e1a921a4 by Denis C de Azevedo Committed by Jan Aagaard Meier

docs(datatype): add a note about BIGINT datatype conversion to string (#5796)

* docs(datatype): add a note about BIGINT datatype conversion to string

This helps users to understand the reason to this conversion and avoid more open issues to Sequelize like these:
- https://github.com/sequelize/sequelize/issues/1774
- https://github.com/sequelize/sequelize/issues/4550

* docs(datatype): add documentation to source code
1 parent e6c6ac35
Showing with 4 additions and 0 deletions
...@@ -89,6 +89,8 @@ Available properties: `UNSIGNED`, `ZEROFILL` ...@@ -89,6 +89,8 @@ Available properties: `UNSIGNED`, `ZEROFILL`
A 64 bit integer. A 64 bit integer.
Note: an attribute defined as `BIGINT` will be treated like a `string` due this [feature from node-postgres](https://github.com/brianc/node-postgres/pull/353) to prevent precision loss. To have this attribute as a `number`, this is a possible [workaround](https://github.com/sequelize/sequelize/issues/2383#issuecomment-58006083).
Available properties: `UNSIGNED`, `ZEROFILL` Available properties: `UNSIGNED`, `ZEROFILL`
*** ***
......
...@@ -277,6 +277,8 @@ INTEGER.prototype.validate = function(value) { ...@@ -277,6 +277,8 @@ INTEGER.prototype.validate = function(value) {
/** /**
* A 64 bit integer. * A 64 bit integer.
* *
* Note: an attribute defined as `BIGINT` will be treated like a `string` due this [feature from node-postgres](https://github.com/brianc/node-postgres/pull/353) to prevent precision loss. To have this attribute as a `number`, this is a possible [workaround](https://github.com/sequelize/sequelize/issues/2383#issuecomment-58006083).
*
* Available properties: `UNSIGNED`, `ZEROFILL` * Available properties: `UNSIGNED`, `ZEROFILL`
* *
* @property BIGINT * @property BIGINT
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!