Open
Description
It looks like the code for most of the methods is too complex, because of the use of the "The Explicit Construction Anti-Pattern" (http://bluebirdjs.com/docs/anti-patterns.html).
For example, instead of
return new Promise((resolve, reject) => {
this.execute('ROLLBACK')
.then(() => {
self[m_transaction] = false;
resolve(true);
})
.catch(error => {
reject(error);
})
})
one should write:
return this.execute('ROLLBACK').then(() => {
self[m_transaction] = false;
return true;
})
which is far simpler and easier to reason about. And performant as well.
Metadata
Metadata
Assignees
Labels
No labels