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 d16de58f
authored
Apr 09, 2020
by
Vidit Kothari
Committed by
GitHub
Apr 09, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(docs/instances): use correct variable for increment (#12087)
1 parent
330728b2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
docs/manual/core-concepts/model-instances.md
docs/manual/core-concepts/model-instances.md
View file @
d16de58
...
...
@@ -147,7 +147,7 @@ In order to increment/decrement values of an instance without running into concu
```
js
const
jane
=
await
User
.
create
({
name
:
"Jane"
,
age
:
100
});
const
incrementResult
=
await
user
.
increment
(
'age'
,
{
by
:
2
});
const
incrementResult
=
await
jane
.
increment
(
'age'
,
{
by
:
2
});
// Note: to increment by 1 you can omit the `by` option and just do `user.increment('age')`
// In PostgreSQL, `incrementResult` will be the updated user, unless the option
...
...
@@ -169,4 +169,4 @@ await jane.increment({
await
jane
.
increment
([
'age'
,
'cash'
],
{
by
:
2
});
```
Decrementing works in the exact same way.
\ No newline at end of file
Decrementing works in the exact same way.
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