Replies: 1 comment
-
@Enakers could you check what is the type of json field returned by the server? E.g output of const [rows, columns] = await pool.query("SELECT something, (SELECT json_object('name', obj.name) FROM (SELECT name FROM person WHERE name = ?) as obj) as person FROM atable WHERE field = condition", "the name");
console.log(columns) |
Beta Was this translation helpful? Give feedback.
0 replies
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,
I may be misunderstanding however I thought the mysql2 driver did the parsing of the returned query? when I do a json_object query a buffer is returned instead of the js object
psuedo code:
Am I misunderstanding or doing something wrong?
thanks.
Beta Was this translation helpful? Give feedback.
All reactions