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

Commit 456d2452 by Mick Hansen

Merge branch 'delucco-patch-2'

2 parents 3ccca4a3 37bb489c
Showing with 5 additions and 5 deletions
...@@ -84,9 +84,9 @@ Sequelize.BLOB('tiny') // TINYBLOB (bytea for PostgreSQL. Other o ...@@ -84,9 +84,9 @@ Sequelize.BLOB('tiny') // TINYBLOB (bytea for PostgreSQL. Other o
Sequelize.UUID // UUID datatype for PostgreSQL and SQLite, CHAR(36) BINARY for MySQL (use defaultValue: Sequelize.UUIDV1 or Sequelize.UUIDV4 to make sequelize generate the ids automatically) Sequelize.UUID // UUID datatype for PostgreSQL and SQLite, CHAR(36) BINARY for MySQL (use defaultValue: Sequelize.UUIDV1 or Sequelize.UUIDV4 to make sequelize generate the ids automatically)
``` ```
The BLOB data type allows you to insert data both as strings and as buffers. When you do a find or findAll on a model which has a BLOB column, that data will always be returned as a buffer. The BLOB data type allows you to insert data both as strings and as buffers. When you do a find or findAll on a model which has a BLOB column. that data will always be returned as a buffer.
If you are working with the PostgreSQL TIMESTAMP WITHOUT TIME ZONE and you need to parse it to a different timezone, please use the pg library's own parser: If you are working with the PostgreSQL TIMESTAMP WITHOUT TIME ZONE and you need to parse it to a different timezone, please use the pg library's own parser:
```js ```js
require('pg').types.setTypeParser(1114, function(stringValue) { require('pg').types.setTypeParser(1114, function(stringValue) {
...@@ -95,7 +95,7 @@ require('pg').types.setTypeParser(1114, function(stringValue) { ...@@ -95,7 +95,7 @@ require('pg').types.setTypeParser(1114, function(stringValue) {
}); });
``` ```
In addition to the type mentioned above, integer, bigint and float also support unsigned and zerofill properties, which can be combined in any order: In addition to the type mentioned above, integer, bigint and float also support unsigned and zerofill properties, which can be combined in any order:
```js ```js
Sequelize.INTEGER.UNSIGNED // INTEGER UNSIGNED Sequelize.INTEGER.UNSIGNED // INTEGER UNSIGNED
...@@ -107,7 +107,7 @@ Sequelize.INTEGER(11).UNSIGNED.ZEROFILL // INTEGER(11) UNSIGNED ZEROFILL ...@@ -107,7 +107,7 @@ Sequelize.INTEGER(11).UNSIGNED.ZEROFILL // INTEGER(11) UNSIGNED ZEROFILL
_The examples above only show integer, but the same can be done with bigint and float_ _The examples above only show integer, but the same can be done with bigint and float_
Usage in object notation: Usage in object notation:
```js ```js
// for enums: // for enums:
...@@ -128,7 +128,7 @@ Getters and Setters can be defined in 2 ways (you can mix and match these 2 ...@@ -128,7 +128,7 @@ Getters and Setters can be defined in 2 ways (you can mix and match these 2
* as part of a single property definition * as part of a single property definition
* as part of a model options * as part of a model options
**N.B.:**If a getter or setter is defined in both places then the function found in the relevant property definition will always take precedence. **N.B.:**If a getter or setter is defined in both places then the function found in the relevant property definition will always take precedence.
### Defining as part of a property ### Defining as part of a property
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!