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

Support array mode result type #122

Open
azmy60 opened this issue Sep 24, 2024 · 0 comments
Open

Support array mode result type #122

azmy60 opened this issue Sep 24, 2024 · 0 comments

Comments

@azmy60
Copy link
Contributor

azmy60 commented Sep 24, 2024

Running this query in duckdb-node:

SELECT 1 as a, 2 as a;

returns:

[{ "a": 2 }]

Ideally, it should captures all values by using arrays instead of objects:

[[ 1, 2 ]]

In better-sqlite3, we can return arrays instead of objects by enabling the .raw() method. I also see DBeaver can handle this correctly, which means that other client might has a support on this already.

The good news is calling .columns() with the example query would return two columns instead of one so hopefully adding "array mode" on the result can be easily implemented!

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant