Open

Description
If you were to create a class that inherits pg.Pool
like so:
const pg = require('pg');
class Db extends pg.Pool {
insert(args) {
return this.query('...');
}
}
const a = new Db();
console.log(a.insert); // undefined
The method insert()
would be undefined on all instances of this custom class. If you were to do the exact same thing with pg.Client
, it works as expected.
Metadata
Metadata
Assignees
Labels
No labels