Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected Handling of Duplicate Column Names in Cell Results #44

Open
AJTonyKane opened this issue May 27, 2022 · 1 comment
Open

Unexpected Handling of Duplicate Column Names in Cell Results #44

AJTonyKane opened this issue May 27, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@AJTonyKane
Copy link

This is an edge case hardly worth mentioning, but I accidentally created a select query with duplicate column label in the results. Interestingly, the SQL Notebook cell results only showed one column, the one with the right-most value. But it was still better than the results displayed by the SQLTools VS Add-In I used until I discovered your gem. For comparison, the attached has a simple example with display output of both compared to MySQL Workbench. Mostly thought you would be interested in knowing, irrespective of whether you think it's worth your time or energy. Regardless, thanks for creating this great tool and best wishes, T

SQL Edge-Case handling by VS Code Add-Ins

@cmoog
Copy link
Owner

cmoog commented Jun 6, 2022

Thanks for this report and providing the detailed comparison. This is interesting indeed. I think we should be able to solve this by using the rowsAsArray: true option in the mysql driver to prevent key collisions for duplicate column names.

https://github.com/sidorares/node-mysql2/blob/ab3feb75bb4af1f6d288c0494a99aa2483ac24d5/index.d.ts#L173

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants