JavaScript: Add type tracking to Postgres model.

This commit is contained in:
Max Schaefer
2020-03-23 17:10:26 +00:00
parent ce0b72f949
commit efbcec09ef
4 changed files with 23 additions and 5 deletions

View File

@@ -0,0 +1,9 @@
const pg = require('pg');
function PgWrapper() {
this.pool = new pg.Pool({});
}
PgWrapper.prototype.query = function (query, params, cb) {
this.pool.query(query, params || [], cb);
};