This will also clear out the confusion on what is the best way to write Async-Await style code when using transaction. https://github.com/tgriesser/knex/issues/3309 also has some discussion on this.
Generally speaking using explicit commit / rollback (the linked comment) is not the best way, but yeah I think we could start using async / await in documentation.
Dear Contributors, It would be amazing to have
Async-Await
example in the transaction sectionExample Code: https://github.com/tgriesser/knex/issues/3309#issuecomment-509613834
This will also clear out the confusion on what is the best way to write
Async-Await
style code when using transaction. https://github.com/tgriesser/knex/issues/3309 also has some discussion on this.