mirror of
https://github.com/knex/knex.git
synced 2025-11-01 10:19:32 +00:00
documentation fix
This commit is contained in:
parent
82f84c467f
commit
a60b00b61e
@ -1029,12 +1029,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