Psql returns "anonymous" in an array of results

I run the following psql on my node server:

SELECT json_data.key AS id, json_data.value::int AS version
FROM players.settings, json_each_text(players.settings.value) AS json_data
WHERE name = $1 AND json_data.value::int > 0;

The returned results include a line anonymousbefore each result object:

[ anonymous { id: '1ab56bd6-ef7d-4755-92d5-1b0cf7beb4b7', version: 1 },
anonymous { id: '4ea3d884-d2a6-4074-a094-a45f6003e6d4', version: 1 } ]

What am I missing here? I have never seen this anonymous string before and would like to get rid of it.

+4
source share
1 answer

As far as I know, you cannot get rid of it, at least not on your side.

See: https://github.com/brianc/node-postgres/issues/1062

This is just a new Node.js 6 feature to send a report to the console when an object was created using an anonymous class.

You can safely ignore it;)

+5

Source: https://habr.com/ru/post/1648809/


All Articles