Open kwando opened 10 months ago
This would be great as a contribution.
For any potential contributors, I suggest looking at the initializeColumnNames
function for code to use as an example from:
It would look a lot like that, but expose more information on those 5 fields.
The JS wrapper code is in here:
Tests are mostly in here (though there are a few more elswhere)
@Jarred-Sumner - i'd love to work on this, could you assign this to me?
thanks!
@Jarred-Sumner - i'd love to work on this, could you assign this to me?
thanks!
Definitely feel free to work in it and submit a PR but it doesn’t make sense to assign it to someone until there’s a PR that is close to merge-able
hey @Jarred-Sumner, just raised a PR for this here: https://github.com/oven-sh/bun/pull/7242
i'd appreciate your feedback on the changes.
What is the problem this feature would solve?
I would like more information about the columns the will be returned from a statement, right now I can only get the
columnName
but more info like the one we can get from better-sqlite would be nice.Stolen from their docs:
https://github.com/WiseLibs/better-sqlite3/blob/HEAD/docs/api.md#columns---array-of-objects
What is the feature you are proposing to solve the problem?
We are wanna do some automagic formatting of the result based the column type. And yes, I'm aware there is only like 5 datatypes and that they can be mixed.
What alternatives have you considered?
Using better-sqlite3 instead of buns built in variant.
https://github.com/WiseLibs/better-sqlite3/blob/HEAD/docs/api.md#columns---array-of-objects