anonymous rows in Node 6
See original GitHub issueAny idea why starting from Node.js 6 we are getting data rows with anonymous
in front?
I mean, the Result object looks like this in the console:
{ command: 'SELECT',
rowCount: 1,
oid: NaN,
rows: [ anonymous { id: 1, login: 'user-1', active: true } ]
And if we print a single row:
console.log(result.rows[0]);
//=>
// anonymous { id: 1, login: 'user-1', active: true }
What is that anonymous
thing and why is it there?
Issue Analytics
- State:
- Created 7 years ago
- Comments:10 (3 by maintainers)
Top Results From Across the Web
How to import anonymous closure in NodeJS - Stack Overflow
Since mynamespace global variable is expected to exist, it should be provided in a sandbox: var sandbox = { mynamespace: {} }; vm....
Read more >6 Performing SQL Operations from PL/SQL - Oracle Help Center
To manipulate Oracle data, you use the INSERT , UPDATE , DELETE , SELECT , and LOCK TABLE commands. INSERT adds new rows...
Read more >PySpark Collect() - Retrieve data from DataFrame
PySpark RDD/DataFrame collect() is an action operation that is used to retrieve all the elements of the dataset (from all nodes) to the...
Read more >FETCH - Amazon Redshift - AWS Documentation
Retrieves rows using a cursor. For information about declaring a cursor, see DECLARE. FETCH retrieves rows based on the current position within the...
Read more >Use SQlite3 in async / await mode
I go on my series of tutorials to learn Node JS and more specifically ... In the example above, the callback function is...
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 FreeTop 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
Top GitHub Comments
It seems to me that it is no actual change, only in console.log. Try using
console.log(JSON.stringify(result))
. It does not change the effect of any code.This does not affect only console logs. I am using
assert.deepStrictEqual
to compare resultsets returned from database to some expected datasets, and after switching to postgres started getting failing asserts when comparing[ anonymous { count: '0' } ]
to[{ count: '0' } ]
resultset.map(row => Object.assign({}, row))
fixes failing assert for me.Node 8.6.0