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

Commit 37bb489c by Mick Hansen

Merge branch 'patch-2' of https://github.com/delucco/sequelize into delucco-patch-2

Conflicts:
	docs/docs/models.md
2 parents 3ccca4a3 b19db76e
Showing with 7 additions and 7 deletions
......@@ -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)
```
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:
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:
```js
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
Sequelize.INTEGER.UNSIGNED // INTEGER UNSIGNED
......@@ -107,8 +107,8 @@ 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_
Usage in object notation:
Usage in object notation:
```js
// for enums:
sequelize.define('model', {
......@@ -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 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
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!