node-oracle icon indicating copy to clipboard operation
node-oracle copied to clipboard

Feature Request - return metadata for cursor columns

Open michaelwitz opened this issue 10 years ago • 4 comments

When working with oracle with JDBC I can get the meta data (datatype, size, etc.) about the columns for each return cursor. Can this feature be added to this module's functionality?

michaelwitz avatar Aug 21 '14 23:08 michaelwitz

I have added this feature to my copy of node-oracle. I added a config object parameter (as optional 3rd parameter) to the Connection::Execute function. So the call looks like:

connection.execute("SELECT systimestamp FROM dual", [], {getCols:true}, function(err, results) {

We could add a "cols" attribute to the result. I am happy to submit. Are the powers-that-be okay with an optional 3rd parameter for config? (it could be used for lowercase column names as well) The optional 3rd parameter could be turned on and off at compile time as well. Thanks, Eric

ericwaldheim avatar Oct 21 '14 15:10 ericwaldheim

"The powers-that-be" are mostly dormant at the moment, which really leaves this module without a good champion. I have been intending for a long time to at least look over and accept the pending pull requests, and hopefully will get there within the next week.

If there is anyone else that is interested in helping maintain this module, I'm sure @joeferner would be willing to add you as a Collaborator.

johannish avatar Oct 21 '14 15:10 johannish

Great. I'll create a pull request tonight for column meta data. Thank you.

ericwaldheim avatar Oct 21 '14 15:10 ericwaldheim

Modified code and regression tests in this pull request (docs await API finalization): https://github.com/joeferner/node-oracle/pull/224 thanks.

ericwaldheim avatar Oct 22 '14 04:10 ericwaldheim