{"name":"idb-connector","version":"1.1.1","description":"A Node.js DB2 driver for IBM i","main":"lib/db2a.js","directories":{"lib":"lib","test":"test"},"scripts":{"test":"./node_modules/mocha/bin/mocha","install":"node-pre-gyp install --fallback-to-build"},"repository":{"type":"git","url":"git+ssh://git@bitbucket.org/litmis/nodejs-idb-connector.git"},"keywords":["DB2","IBMi","IBM i","iSeries"],"author":{"name":"IBM"},"license":"MIT","gypfile":true,"homepage":"https://bitbucket.org/litmis/nodejs-idb-connector#readme","contributors":[{"name":"Xu Meng","email":"dmabupt@gmail.com"},{"name":"Abdirahim Musse","email":"abdirahim.musse@ibm.com"},{"name":"Aaron Bartell","email":"aaronbartell@gmail.com"}],"dependencies":{"node-addon-api":"^1.2.0","node-gyp":"^3.6.2","node-pre-gyp":"^0.10.2"},"devDependencies":{"bindings":"^1.3.0","chai":"^4.1.2","mocha":"^5.2.0"},"binary":{"module_name":"db2ia","module_path":"./lib/binding/{configuration}/{node_abi}-ibmi-{arch}/","remote_path":".","package_name":"{module_name}-v{version}-{node_abi}-ibmi-{arch}.tar.gz","host":"https://bitbucket.org/litmis/nodejs-idb-connector/downloads"},"gitHead":"6fa8b0ecf82c2c0cf5fc98b3bc892434f6823884","bundleDependencies":["node-pre-gyp"],"_id":"idb-connector@1.1.1","_npmVersion":"5.6.0","_nodeVersion":"8.11.3","_npmUser":{"name":"dmabupt","email":"dmabupt@gmail.com"},"dist":{"integrity":"sha512-xJTh93skT6bIw0PXTf88Ib3LDi71IWKhEalcdKeKSkISfNjf7c6704Da/1Nl/S9k/rouNGiIGxqJqNdCyC0fxw==","shasum":"cf527284cc988f5ae2752b2d629941affc7af05e","tarball":"http://registry-npm.ywwl.com/idb-connector/download/idb-connector-1.1.1.tgz","fileCount":541,"unpackedSize":2102701,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbY/vnCRA9TVsSAnZWagAAWjkP/3tFZ+ieeUnHnJtyaAAM\ng8FKkRcbSNYNMJGi2F61/z3DQbEK6dUvWKX7rJMUzIfec5NkHL3QALk2RwiJ\n1jnyDqZI8eZwzKSCk+xY47YkNW8C4OT46X0FdGp/KQtV0T17UWmGVdXv6f11\ndYqX2s92XGEBkvxjmGM41OKg9Hb475Q8KEYx6ImoYgI61zAetsFE3DBNOfQk\nttqzQFm7wxY7wRXQ0JREpS0dRYnyEhQC2YqaeC+OBCm+233GOJ+bLHtV68Mc\nWL2SfXjrm48v6OstRA81p/6qgr5thTzEEFdgOCHThF5/FYaCTGKecR9fR62A\nNAsmCI0HwrxpRAHOOOO37n/s7pxuHxlxosbkBTp0IXL0SrcH2oxhRBiwdH53\nrRv0CrFGo+CpFMOIRO4wwm0CIH/KVbuCrKL/LsfNi7iX6FRYI0VF0cu4gtGR\nB7kp0MdgbK9aun3LQFU35ZYsRHR0HWPtKMP+3zBAfPA4M1fRMlLCOgbAbRU1\nKr53ywqgf1bckZ+AASczHMPnM3pKM10kyMTRdkBFWKRs5SLxMb40PTGQgVfh\nuKOJp6YSvQTWubgqj5Yb7viJNt5T/E1boBF/YAT8nH9dxpCfXDNWKWlGvUWy\nxm3sREmguPKzwXrwuvg+hR23LD1SVly88bAxRkJftCH6zV8KbNW9MDlIk/ML\n/lVa\r\n=2Yya\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDYraXIWM/fE4nLLZj62EDbeLiVjo/bDCzEoB5/jq75sAiB4vR7Mr3AK3mTE6xkEfEYUcKgJN1AY9jKir/kETXiz7w=="}],"size":639727,"noattachment":false,"key":"/idb-connector/-/idb-connector-1.1.1.tgz"},"maintainers":[{"email":"aaronbartell@gmail.com","name":"aaronbartell"},{"email":"dmabupt@gmail.com","name":"dmabupt"},{"email":"jgorzins@us.ibm.com","name":"theprez"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/idb-connector_1.1.1_1533279207111_0.4866149933033408"},"_hasShrinkwrap":false,"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## 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":1533279207292,"_cnpm_publish_time":1533279207292,"dist-tags":{"beta":"1.2.19-beta.0","latest":"1.3.1","rc":"1.3.0-rc.4"}}