question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

anonymous rows in Node 6

See original GitHub issue

Any 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:closed
  • Created 7 years ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

6reactions
joskuijperscommented, Aug 30, 2016

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.

4reactions
Mchlcommented, Dec 15, 2017

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found