Created
October 29, 2016 21:01
-
-
Save danneu/c6ae99525026fcf32b3c5e91a4a8b991 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// objective: | |
// - move pool.query to pool._query | |
// - redefine pool.query to wrap the original pool.query | |
pg.Pool.prototype._query = pg.Pool.prototype.query | |
pg.Pool.prototype.query = wrapper(async function (sql, params) { | |
return await this._query(sql, params) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment