IBM / nodejs-idb-connector

A JavaScript (Node.js) library for communicating with Db2 for IBM i, with support for queries, procedures, and much more. Uses traditional callback-style syntax
MIT License
38 stars 23 forks source link

Add new API bindParameters() for simple parameter bindings #112

Closed dmabupt closed 4 years ago

dmabupt commented 4 years ago

It implements the feature mentioned in PR #111

dmabupt commented 4 years ago

I have to mention that the output of the parameter list has changed!

Previously we only get the out & in_out parameters output. But now the new API can not distinguish them, so all the parameters will be in the output.

For example, the most famous procedure -- call QXMLSERV.iPLUG512K(?,?,?,?) Its parameter list is --

        [ipc, IN, CHAR],
        [ctl, IN, CHAR],
        [xmlIn, IN, CLOB],
        [xmlOut, OUT, CLOB],

When we run execute() against it.

Previously the output array has 1 element - the last output parameter xmlOut. Now all the 4 parameters will be in the output array!