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

Commit 89802e0e by Sushant

docs: improve datatype docs

1 parent fa57155e
Showing with 4 additions and 3 deletions
...@@ -229,13 +229,14 @@ modules.exports = function sequelizeAdditions(Sequelize) { ...@@ -229,13 +229,14 @@ modules.exports = function sequelizeAdditions(Sequelize) {
} }
} }
DataTypes.NEWTYPE = NEWTYPE;
// Mandatory, set key // Mandatory, set key
DataTypes.NEWTYPE.prototype.key = DataTypes.NEWTYPE.key = 'NEWTYPE' DataTypes.NEWTYPE.prototype.key = DataTypes.NEWTYPE.key = 'NEWTYPE'
// Optional, disable escaping after stringifier. Not recommended. // Optional, disable escaping after stringifier. Not recommended.
// Warning: disables Sequelize protection against SQL injections // Warning: disables Sequelize protection against SQL injections
//DataTypes.NEWTYPE.escape = false // DataTypes.NEWTYPE.escape = false
// For convenience // For convenience
// `classToInvokable` allows you to use the datatype without `new` // `classToInvokable` allows you to use the datatype without `new`
......
...@@ -36,7 +36,7 @@ The method `findOrCreate` can be used to check if a certain element already exis ...@@ -36,7 +36,7 @@ The method `findOrCreate` can be used to check if a certain element already exis
Let's assume we have an empty database with a `User` model which has a `username` and a `job`. Let's assume we have an empty database with a `User` model which has a `username` and a `job`.
`where` option will be appended to `defaults` for create case. `where` option will be appended to `defaults` for create case.
```js ```js
User User
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!