
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
idb-connector
Advanced tools
The Node.js iDB Connector is an IBM i Node.js Db2 driver open source project from IBM
npm i idb-connector
NOTE This package only installs on IBM i systems.
Then you can require in your code, as shown below.
const db = require('idb-connector');
const {dbconn, dbstmt} = require('idb-connector');
const sSql = 'SELECT STATE FROM QIWS.QCUSTCDT';
const connection = new dbconn();
connection.conn('*LOCAL');
const statement = new dbstmt(connection);
statement.exec(sSql, (x) => {
console.log(JSON.stringify(x));
statement.close();
connection.disconn();
connection.close();
});
const {dbconn, dbstmt} = require('idb-connector');
const sSql = 'SELECT STATE FROM QIWS.QCUSTCDT';
const connection = new dbconn();
connection.conn('*LOCAL');
const statement = new dbstmt(connection);
statement.prepare(sSql, () => {
statement.execute(() => {
statement.fetchAll((x) => {
console.log(`Result is : ${JSON.stringify(x)}`);
statement.close();
});
});
});
const {
dbconn, dbstmt, IN, OUT, CHAR, CLOB,
} = require('idb-connector');
const sql = 'CALL QXMLSERV.iPLUG512K(?,?,?,?)';
const connection = new dbconn();
connection.conn('*LOCAL');
const statement = new dbstmt(connection);
const ipc = '*NA';
const ctl = '*here';
const xmlIn = `<xmlservice><sh>system 'wrksbs'</sh></xmlservice>`;
const xmlOut = '';
statement.prepare(sql, () => {
statement.bindParam([
[ipc, IN, CHAR],
[ctl, IN, CHAR],
[xmlIn, IN, CLOB],
[xmlOut, OUT, CLOB],
], () => {
statement.execute((out) => { // 'out' is an array of output params
for (let i = 0; i < out.length; i += 1) {
console.log(out[i]);
}
statement.close();
connection.disconn();
connection.close();
});
});
});
View CHANGELOG.md
file.
Note that building isn't necessary for end users and is more for developers looking to compile the native Node.js extensions (C code).
git clone git@github.com:IBM/nodejs-idb-connector.git
cd nodejs-idb-connector
npm install --build-from-source
Note: sqlcli header files, gcc, and python are required to compile the code.
yum install sqlcli-devel
yum group install 'Development tools'
yum install python2
Please read the contribution guidelines.
1.2.2
FAQs
A Node.js DB2 driver for IBM i
The npm package idb-connector receives a total of 91 weekly downloads. As such, idb-connector popularity was classified as not popular.
We found that idb-connector demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.