Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
public
/
sequelize
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
不要怂,就是干,撸起袖子干!
Commit 89802e0e
authored
Jun 26, 2019
by
Sushant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
docs: improve datatype docs
1 parent
fa57155e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
docs/data-types.md
docs/models-usage.md
docs/data-types.md
View file @
89802e0
...
...
@@ -229,13 +229,14 @@ modules.exports = function sequelizeAdditions(Sequelize) {
}
}
DataTypes
.
NEWTYPE
=
NEWTYPE
;
// Mandatory, set key
DataTypes
.
NEWTYPE
.
prototype
.
key
=
DataTypes
.
NEWTYPE
.
key
=
'NEWTYPE'
// Optional, disable escaping after stringifier. Not recommended.
// Warning: disables Sequelize protection against SQL injections
//DataTypes.NEWTYPE.escape = false
//
DataTypes.NEWTYPE.escape = false
// For convenience
// `classToInvokable` allows you to use the datatype without `new`
...
...
docs/models-usage.md
View file @
89802e0
...
...
@@ -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`
.
`where`
option will be appended to
`defaults`
for create case.
`where`
option will be appended to
`defaults`
for create case.
```
js
User
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment