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 8ecc3085
authored
Jun 03, 2014
by
Mick Hansen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change transaction docs
1 parent
d01ce9b1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
10 deletions
.npmignore
lib/sequelize.js
.npmignore
View file @
8ecc308
...
...
@@ -5,4 +5,4 @@ README.md
.watchr.js
changelog.md
Makefile
coverage*
coverage*
\ No newline at end of file
lib/sequelize.js
View file @
8ecc308
...
...
@@ -721,16 +721,12 @@ module.exports = (function() {
* Start a transaction. When using transactions, you should pass the transaction in the options argument in order for the query to happen under that transaction
*
* ```js
* sequelize.transaction(function(t) {
* User.find(..., { transaction: t}).success(function (user) {
* user.updateAttributes(..., { transaction: t}).success(function () {
* t.commit()
* })
* })
*
* // the commit / rollback will emit events which can be observed via:
* t.done(function() {
* sequelize.transaction().then(function (t) {
* return User.find(..., { transaction: t}).then(function (user) {
* return user.updateAttributes(..., { transaction: t});
* })
* .then(t.commit.bind(t))
* .catch(t.rollback.bind(t));
* })
* ```
*
...
...
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