{"name":"idb-connector","version":"1.3.0","keywords":["DB2","IBMi","iSeries","OS400"],"author":{"name":"IBM"},"license":"MIT","_id":"idb-connector@1.3.0","maintainers":[{"name":"theprez","email":"jgorzinski@gmail.com"},{"name":"dmabupt","email":"dmabupt@gmail.com"},{"name":"abmusse","email":"abdirahim.musse@gmail.com"},{"name":"markdirish","email":"mirish@ibm.com"},{"name":"kadler","email":"kadler@us.ibm.com"}],"contributors":[{"url":"https://github.com/dmabupt","name":"Xu Meng","email":"dmabupt@gmail.com"},{"url":"https://github.com/abmusse","name":"Abdirahim Musse","email":"abdirahim.musse@ibm.com"},{"url":"https://github.com/aaronbartell","name":"Aaron Bartell","email":"aaronbartell@gmail.com"},{"url":"https://github.com/kadler","name":"Kevin Adler","email":"kadler@us.ibm.com"},{"url":"https://github.com/markdirish","name":"Mark Irish","email":"mirish@ibm.com"}],"homepage":"https://github.com/IBM/nodejs-idb-connector","bugs":{"url":"https://github.com/IBM/nodejs-idb-connector/issues"},"os":["os400"],"dist":{"shasum":"62539f6a57917e3dce364ff68090ff20d909f420","tarball":"http://registry-npm.ywwl.com/idb-connector/download/idb-connector-1.3.0.tgz","fileCount":12,"integrity":"sha512-gCXE+H4pkLADB6j+GCn+zplwq9havASmv3+4iSmqfrf/sCNFEnDCKMfyvNPISJuafQbVqVz2+17OmY3FyrC32w==","signatures":[{"sig":"MEUCIQDT1e+gor+ez7dm9eKIENs3hIrAdiVK4vlVwbkKgw35GgIgOByXfpMRWzX89lolp2X6Ce0YuPHyMLo/U68s4YnNKMQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIAFnsdP9QMCvD/Xo8UR4/dll/4U1UMromwTg0i+yVl3xAiEAwV3olDwJCFj/nmOcL2AyCb3cJSeYf4uG0thi05U/isw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/idb-connector@1.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":3583715,"size":566834,"noattachment":false,"key":"/idb-connector/-/idb-connector-1.3.0.tgz"},"main":"lib/db2a.js","gitHead":"36dd8f3ef2e152f98b90fb7b21ddda0186498e70","scripts":{"test":"./node_modules/mocha/bin/mocha.js --timeout 30s","install":"node-gyp-build","rebuild":"npm install --build-from-source","release":"./node_modules/release-it/bin/release-it.js"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:17d9899a-4377-4ebd-832f-d97e4bcf0634"}},"repository":{"url":"git+ssh://git@github.com/IBM/nodejs-idb-connector.git","type":"git"},"_npmVersion":"11.19.0","description":"A Node.js DB2 driver for IBM i","directories":{"lib":"lib","test":"test"},"_nodeVersion":"24.21.0","dependencies":{"node-addon-api":"^3.1.0","node-gyp-build":"^4.8.4"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.3.6","mocha":"^12.0.1","eslint":"^8.26.0","release-it":"^21.0.0","eslint-plugin-import":"^2.26.0","eslint-config-airbnb-base":"^15.0.0","@release-it/conventional-changelog":"^12.0.0"},"_npmOperationalInternal":{"tmp":"tmp/idb-connector_1.3.0_1790115404739_0.23932571161203886","host":"s3://npm-registry-packages-npm-production"},"readme":"# Node.js iDB Connector for IBM i\n\nThe Node.js iDB Connector is an IBM i Node.js Db2 driver open source project from IBM\n\n[![NPM](https://nodei.co/npm/idb-connector.png?downloads=true&downloadRank=true)](https://nodei.co/npm/idb-connector/)\n\n[![Node-API v3 Badge](https://github.com/nodejs/abi-stable-node/blob/doc/assets/Node-API%20v3%20Badge.svg)](https://nodejs.org/dist/latest/docs/api/n-api.html#n_api_node_api_version_matrix)\n\n## Installation\n\n```sh\n    npm i idb-connector\n```\n\n**NOTE:** This package only installs on IBM i systems.\n\nThen you can _require_ in your code, as shown below.\n\n```js\n    const db = require('idb-connector');\n```\n\n---\n**NOTE:** starting with version 12, npm will no longer run install scripts by default. When installing, you will see a message like this:\n\n```sh\nnpm warn install-scripts   idb-connector@1.3.0 (install: node-gyp-build)\n```\n\nWe use [node-gyp-build](https://github.com/prebuild/node-gyp-build) to build and ship a prebuilt binary with the package. With the prebuilt binary, the install script doesn't actually do anything and you do not need to approve it for the package to work. You may want to approve it to silence the warning, however.\n\nFor more information refer to the [npm blog post](https://github.blog/changelog/2026-06-09-upcoming-breaking-changes-for-npm-v12/).\n\n\n## Quick Example\n\n### Example 1: Fetching data using the exec() API\n\n```js\n    const {dbconn, dbstmt} = require('idb-connector');\n\n    const sSql = 'SELECT STATE FROM QIWS.QCUSTCDT';\n    const connection = new dbconn();\n    connection.conn('*LOCAL');\n    const statement = new dbstmt(connection);\n\n    statement.exec(sSql, (x) => {\n      console.log(JSON.stringify(x));\n      statement.close();\n      connection.disconn();\n      connection.close();\n    });\n\n```\n\n### Example 2: Fetching data using the fetchAll() API\n\n```js\n\n    const {dbconn, dbstmt} = require('idb-connector');\n\n    const sSql = 'SELECT STATE FROM QIWS.QCUSTCDT';\n    const connection = new dbconn();\n    connection.conn('*LOCAL');\n    const statement = new dbstmt(connection);\n\n    statement.prepare(sSql, () => {\n      statement.execute(() => {\n        statement.fetchAll((x) => {\n          console.log(`Result is : ${JSON.stringify(x)}`);\n          statement.close();\n        });\n      });\n    });\n\n```\n\n### Example 3: Call stored procedures\n\n```js\n    const {dbconn, dbstmt} = require('idb-connector');\n\n    const sql = 'CALL QXMLSERV.iPLUG512K(?,?,?,?)';\n    const connection = new dbconn();\n    connection.conn('*LOCAL');\n    const statement = new dbstmt(connection);\n\n    const ipc = '*NA';\n    const ctl = '*here';\n    const xmlIn = `<xmlservice><sh>system 'wrksbs'</sh></xmlservice>`;\n    const xmlOut = '';\n\n    statement.prepare(sql, () => {\n      statement.bindParameters([ipc, ctl, xmlIn, xmlOut], () => {\n        statement.execute((out) => {\n          for (let i = 0; i < out.length; i += 1) {\n            console.log(out[i]);\n          }\n          statement.close();\n          connection.disconn();\n          connection.close();\n        });\n      });\n    });\n\n```\n\n## API Reference\n\n[Db2 for i Access APIs](https://github.com/IBM/nodejs-idb-connector/blob/master/docs/README.md)\n\n## Change Log\n\nView [`CHANGELOG.md`](https://github.com/IBM/nodejs-idb-connector/blob/master/CHANGELOG.md) file.\n\n## Build\n\nNote that building isn't necessary for end-users and is more for developers looking to compile the native Node.js extensions (C code).\n\n```sh\n    git clone git@github.com:IBM/nodejs-idb-connector.git\n    cd nodejs-idb-connector\n    npm install --build-from-source\n```\n### Build Dependencies\nNote: sqlcli header files, GCC, and Python are required to compile the code.\n\n```sh\n    yum install sqlcli-devel\n    yum group install 'Development tools' \n    yum install python2\n```\n\n## License\n\n[`MIT`](https://github.com/IBM/nodejs-idb-connector/blob/master/LICENSE)\n\n## **Contributing**\n\nPlease read the [contribution guidelines](https://github.com/IBM/nodejs-idb-connector/blob/master/CONTRIBUTING.md).\n","publish_time":1790115404901,"_cnpm_publish_time":1790115404901,"dist-tags":{"beta":"1.2.19-beta.0","latest":"1.3.1","rc":"1.3.0-rc.4"}}