`pg` adapter leaks symbols in rows
See original GitHub issueHello again,
We noticed that rows being return from pg adapter queries include Symbol(_id).
This is mostly aesthetic, but can be confusing. I’ll be happy try a PR, do you have any pointers ?
Best,
// pg-mem/src/tests/pg.spec.ts
it('does not leak symbol properties in rows', async () => {
simpleDb();
const { Client } = db.adapters.createPg();
const client = new Client();
await client.connect();
many(`create table mytable (msg varchar);
insert into mytable values ('hello'), ('hi');`);
const got = await client.query('select * from mytable;');
// fails
expect(Object.getOwnPropertySymbols(got.rows[0]).length).to.be.equal(0);
await client.end();
});
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Common symbols around you - Helpful
The third line (output)'s solid and dotted line indicates DC. Power supply type: switch-mode, linear, general/unspecified.
Read more >undici leaking Symbol to global space in 18.2 (but not 18.1)
Aren't we supposed to detect leaked globals in the Node.js CI? The check is in test/common/index.js . I'm guessing that it would miss...
Read more >Database.txIf - pg-promise API
A promise object that represents the query result: When no rows are returned, it resolves with an empty array. When 1 or more...
Read more >Capacitors - SparkFun Learn
The capacitors symbol consists of two parallel lines, which are either flat or curved; both lines should be parallel to each other, close,...
Read more >iOS 9 iPad keyboard adds keys & symbols at bigger screen ...
These symbols appear larger in the first full-size keycap row, again along with some new additions compared to current iPads. The larger layout ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@A7med-Ragheb this shipped with
pg-mem@1.9.12I guess that you could clone the results using somehting like
Object.fromEntries(Object.entries(myRow))in adaptResults() to get rid of the symbols