-
Notifications
You must be signed in to change notification settings - Fork 64
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
Get fields of result #94
Comments
There's a branch that I'm working on that brings this back.
…On Thu, 5 Jul 2018, 12:23 Charlie, ***@***.***> wrote:
In vanilla node-mysql you can get the fields of a returned query like this:
con.query("...", (err, results, fields) => { console.log(fields) } )
But with node-promise-mysql it seems to have lost that ability:
con.query("...")
.then((results, fields) => {
console.log(fields) // undefined
});
This feels like something that has been overlooked, I was hesitant to post
this as an issue as I might just be looking in the wrong place; but I can't
figure out how to get the columns.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#94>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/AEjy1Fhq_dXdcr2EE5X7AvYq6Pp5dz4wks5uDfcygaJpZM4VDtTh>
.
|
Is there any way I could access that branch? If it's stable that is. I don't need the majority of the package's functionality. NB: Jesus that was a quick reply |
You can get it here: https://github.com/lukeb-uk/node-promise-mysql/tree/mysql-wrapper If you pass
|
Thanks man! Is there any way I could unpack the array before passing it as arguments so I could still use it in the clean |
Unfortunately not, promises only take one argument. |
Ah that's a shame. Seems like a pretty pointless restriction. |
It's what's in the spec 🤷♂️ If this issue is resolved, please close it |
Ah sorry about that, forgot closing issues was a thing. :P |
In vanilla node-mysql you can get the fields of a returned query like this:
But with node-promise-mysql it seems to have lost that ability:
This feels like something that has been overlooked, I was hesitant to post this as an issue as I might just be looking in the wrong place; but I can't figure out how to get the columns.
Thank you in advance!
The text was updated successfully, but these errors were encountered: