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

getColumnMetaData option

Open ericwaldheim opened this issue 11 years ago • 0 comments

This pull request adds an options argument to connection.execute as optional 3rd argument. This allows specification of {getColumnMetaData:true} as the options argument.

I added regression tests. Existing tests pass. I will need to modify the documentation if this is accepted but I'll wait until we agree on an API before I finish that.

Example will look something like this:

...
    connection.execute(
        "SELECT * FROM person", [], {getColumnMetaData:true},
        function(err, results) {
            if ( err ) { ... } 
            // results.columnMetaData = [ { name: 'ID', type: 4 }, { name: 'NAME', type: 3 } ]
            connection.close();
        }
    );
    ...

Thank you

ericwaldheim avatar Oct 22 '14 04:10 ericwaldheim