Skip to content

getColumnMetaData option #224

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ericwaldheim
Copy link
Contributor

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

…Allows specification of {getColumnMetaData:true} for column meta data retrieval
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

Successfully merging this pull request may close these issues.

1 participant