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 5d2663d7
authored
Dec 07, 2014
by
Mick Hansen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ci skip] Transaction documentation errors
1 parent
f8431ac4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
docs/docs/transactions.md
docs/docs/transactions.md
View file @
5d2663d
...
@@ -6,7 +6,7 @@ The key difference is that the managed transaction uses a callback that expects
...
@@ -6,7 +6,7 @@ The key difference is that the managed transaction uses a callback that expects
### Auto commit/rollback
### Auto commit/rollback
```
js
```
js
return
sequelize
.
transaction
(
t
)
{
return
sequelize
.
transaction
(
function
(
t
)
{
return
User
.
create
({
return
User
.
create
({
firstName
:
'Abraham'
,
firstName
:
'Abraham'
,
lastName
:
'Lincoln'
lastName
:
'Lincoln'
...
@@ -25,9 +25,9 @@ return sequelize.transaction(t) {
...
@@ -25,9 +25,9 @@ return sequelize.transaction(t) {
});
});
```
```
### Handled
by user
### Handled
manually
```
js
```
js
return
sequelize
.
transaction
().
function
(
t
)
{
return
sequelize
.
transaction
().
then
(
function
(
t
)
{
return
User
.
create
({
return
User
.
create
({
firstName
:
'Homer'
,
firstName
:
'Homer'
,
lastName
:
'Simpson'
lastName
:
'Simpson'
...
...
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