result = await sql.unsafe(query).values() also returns columns #534
Unanswered
half-metal
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, it appears using postgres with .values() returns more than just db rows, and the result array returned is actually larger.
I am confused that when I have
result = await sql.unsafe(query).values()
within my result array there is actually columns returned for example:return json([result.columns, result]) //column names and rows //columns and rows
return json([result]) // only rows
Lets say I am selecting one record. Instead of a small array, I now have every column adding to the size
Is there a way to only return rows and keep the result minimal?
Beta Was this translation helpful? Give feedback.
All reactions