mirror of
https://github.com/knex/knex.git
synced 2025-11-17 02:24:57 +00:00
documentation fix
This commit is contained in:
parent
82f84c467f
commit
a60b00b61e
@ -1029,12 +1029,12 @@ knex('accounts')
|
|||||||
|
|
||||||
knex.transaction(function(trx) {
|
knex.transaction(function(trx) {
|
||||||
|
|
||||||
knex('books').transacting(t).insert({name: 'Old Books'})
|
knex('books').transacting(trx).insert({name: 'Old Books'})
|
||||||
.then(function(id) {
|
.then(function(id) {
|
||||||
return someExternalMethod(t);
|
return someExternalMethod(trx);
|
||||||
})
|
})
|
||||||
.then(t.commit)
|
.then(trx.commit)
|
||||||
.then(t.rollback);
|
.then(trx.rollback);
|
||||||
|
|
||||||
}).then(function(resp) {
|
}).then(function(resp) {
|
||||||
console.log('Transaction complete.');
|
console.log('Transaction complete.');
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user