You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SELECTpeople.id, people.name, pets.id, pets.nameFROM people
LEFT JOIN pets ONpeople.id=pets.person_id
I'll get a Mariaex.Result with a columns field of: ["id", "name", "id", "name"] and rows of `[[1, "Joe", 1, "Fluffy"], [1, "Joe", 2, "Fido"]].
This becomes really hard to deal with when the queries are more like
SELECT people.*, pets.*
When the query may return a different number of columns in the future.
Is there any way to have entries in the columns field include the table name? Or, alternatively, get results as a list of nested data structures?
For example, the npm mysql package handles this problem by including a nestTables option where you can either get results as a series of nested data structures, or specify a string for concatenating table name and column name: (https://www.npmjs.com/package/mysql#joins-with-overlapping-column-names).
The text was updated successfully, but these errors were encountered:
If I perform a query like
I'll get a
Mariaex.Result
with acolumns
field of:["id", "name", "id", "name"]
androws
of `[[1, "Joe", 1, "Fluffy"], [1, "Joe", 2, "Fido"]].This becomes really hard to deal with when the queries are more like
When the query may return a different number of columns in the future.
Is there any way to have entries in the
columns
field include the table name? Or, alternatively, get results as a list of nested data structures?For example, the npm mysql package handles this problem by including a
nestTables
option where you can either get results as a series of nested data structures, or specify a string for concatenating table name and column name: (https://www.npmjs.com/package/mysql#joins-with-overlapping-column-names).The text was updated successfully, but these errors were encountered: