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

Return an array of arrays and column metadata rather than an array of objects #67

Open
mikeburgh opened this issue May 20, 2024 · 0 comments

Comments

@mikeburgh
Copy link

Great work! Solves so many headaches with electron!

Have you any plans to add support for returning an array of arrays (rather than objects) and column metadata ?

better-sqlite3 does this via a raw method to enable it, and then a columns method to fetch the column metadata.

https://github.com/WiseLibs/better-sqlite3/blob/master/docs/api.md#rawtogglestate---this

My use case for the array of arrays is dealing with overlapping column names, a contrived example is:

select 'short' as 'long', 'test' as 'long';

The meta data is to be able to handle better typing in the returned results.

Some other node based database drivers will return it in one call rather than needing two like better does... but I have not dug into see if it is something specific to SQLite that requires the two methods or just their API approach.

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