{"name":"idb-connector","version":"1.0.12","description":"A Node.js DB2 driver for IBM i","main":"lib/db2a.js","directories":{"test":"test"},"scripts":{"test":"node test/test.js","install":"node-pre-gyp install --fallback-to-build","prepublish":"npm ls"},"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":"Aaron Bartell","email":"aaronbartell@gmail.com"}],"dependencies":{"node-pre-gyp":"0.6.x"},"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":"4a2ff221d751ac9430a8e8319c421ee1caa81655","bundleDependencies":["node-pre-gyp"],"_id":"idb-connector@1.0.12","_npmVersion":"5.6.0","_nodeVersion":"8.10.0","_npmUser":{"name":"dmabupt","email":"dmabupt@gmail.com"},"dist":{"integrity":"sha512-wrTFLSsygYQOx8nRqAaBx05eYR5Pw7J48j2l07hlYQ2k7sskA/BuGmjr0rz8XBVk4kGRV4DDrBw2G+EIdlDcHg==","shasum":"524f90e7d40ddf68c757f6eaf13e8fac10ae1ab9","tarball":"http://registry-npm.ywwl.com/idb-connector/download/idb-connector-1.0.12.tgz","fileCount":1088,"unpackedSize":6268817,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbKxf3CRA9TVsSAnZWagAAYAUQAJqu/cp7C236Z3k0rtlU\nEXuYNRB+QQbhauE7zs9tKaCQYACgmoNqJPr9zl+u581PKU8JDWG+JTSVjcFI\nBGTcByZ0cLXfQub5D+EI6UU2KguCo41q5PwXw1t18l8YQWM/W9bPqNTN3fX5\naUlhWxEjoVgOSZ0JfnhmnyiCLNPAcM1lU2OdZSXyyRIdstYS25rmtj07Dfp1\nqSKDypZn9BXDySOrJu1Ymw2ZjTPxb0XUN9LzJbpmrrMHIxfOi6k5GXavE3zY\nHfK+EQ2GH/fgo01zKZ206HV9nD/rBQdQ/DgxO613Qu6nmdwyKj7KJ+IJ6+m/\njfY7Hdu/RhtVsc6leEv6Sk8ay1N3aZwLD3OKtdMxGVNNTqYm3+FJJYULh+5q\nPFf5n/4YyDTXUqgJC+DNZvupQSDxiKx9utspSxm7w8EZDrPRT9+tO7Tghqs9\n5q+ed+rDl8za+0lX0Em2rR7kIGMPkJKfWjcc2QzAitievxgDdgWMFoJP1A2k\naDgI06ns+pYqsYzbjtb2ZoZzSOnSqIjGzd6Z+fFrkMeOH6cJqioT0fdBu88b\nTpNpdfAKwmKsb3IMB0TGwZMjZTlsbPWdT5hbF6x00Y6Phwb+q5ogqI6GZwxZ\ngRwE3ELulTJqcBkc4DiHY4Djaump6nI3b/pF0GKoZwZ6llB5+sCac6y0LsrU\n/i6S\r\n=yvLM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHFIaCeyGbVB9F/JeEjPlTxW/9QWcS2+Fo4wzIHm9eCAAiEAkN4sE6POcOdfrp1dzAiibpIccAyEnqCT3uyEuFgO5u8="}],"size":1693853,"noattachment":false,"key":"/idb-connector/-/idb-connector-1.0.12.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.0.12_1529550839125_0.5703222602237112"},"_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":1529550839255,"_cnpm_publish_time":1529550839255,"dist-tags":{"beta":"1.2.19-beta.0","latest":"1.3.1","rc":"1.3.0-rc.4"}}