mirror of
https://github.com/knex/knex.git
synced 2025-12-28 15:38:41 +00:00
Merge branch 'master' of github.com:tgriesser/knex
* 'master' of github.com:tgriesser/knex: documentation fix
This commit is contained in:
commit
c647cc9e01
@ -1030,12 +1030,12 @@ knex('accounts')
|
||||
|
||||
knex.transaction(function(trx) {
|
||||
|
||||
knex('books').transacting(t).insert({name: 'Old Books'})
|
||||
knex('books').transacting(trx).insert({name: 'Old Books'})
|
||||
.then(function(id) {
|
||||
return someExternalMethod(t);
|
||||
return someExternalMethod(trx);
|
||||
})
|
||||
.then(t.commit)
|
||||
.then(t.rollback);
|
||||
.then(trx.commit)
|
||||
.then(trx.rollback);
|
||||
|
||||
}).then(function(resp) {
|
||||
console.log('Transaction complete.');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user