{"name":"idb-connector","version":"1.2.9","description":"A Node.js DB2 driver for IBM i","os":["aix"],"main":"lib/db2a.js","directories":{"lib":"lib","test":"test"},"scripts":{"test":"ln -sf ./build-tmp-napi-v3 ./build && ./node_modules/mocha/bin/mocha","install":"node-pre-gyp install --fallback-to-build"},"repository":{"type":"git","url":"git+ssh://git@github.com/IBM/nodejs-idb-connector.git"},"keywords":["DB2","IBMi","IBM i","iSeries"],"author":{"name":"IBM"},"license":"MIT","gypfile":true,"homepage":"https://github.com/IBM/nodejs-idb-connector","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.7.1","node-pre-gyp":"^0.14.0"},"devDependencies":{"bindings":"^1.5.0","chai":"^4.2.0","eslint":"^5.14.1","eslint-config-airbnb-base":"^13.1.0","eslint-plugin-import":"^2.16.0","mocha":"^6.2.2"},"binary":{"module_name":"db2ia","module_path":"./lib/binding/{configuration}/napi{napi_build_version}-ibmi-{arch}/","remote_path":"./{version}/","package_name":"{module_name}-v{version}-napi{napi_build_version}-ibmi-{arch}.tar.gz","host":"https://github.com/IBM/nodejs-idb-connector/releases/download","napi_versions":[3]},"bundleDependencies":["node-pre-gyp"],"gitHead":"d115a46af1a45cbf07181b12abfdf39a63970350","bugs":{"url":"https://github.com/IBM/nodejs-idb-connector/issues"},"_id":"idb-connector@1.2.9","_nodeVersion":"10.19.0","_npmVersion":"6.13.4","dist":{"integrity":"sha512-wyOPMdU86mAqCrDi0KAAiG9r5md3wHzaO8cqzs8IRYDXNeMPp66gUefdnYTYa7fA9kTlNqIJtZGCy1Uc0+iqEQ==","shasum":"a11a8e6f12e41c3b6cf429f114b34cd4b833e668","tarball":"http://registry-npm.ywwl.com/idb-connector/download/idb-connector-1.2.9.tgz","fileCount":560,"unpackedSize":13670703,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJey7zwCRA9TVsSAnZWagAA4TgP/3LVtX+vvHUtV7gwMBb5\nRHF8vKp6hX/yQ3Zu4d+mNCPA0uTAvJEljIOu/z+ymcPWU+kN0+rA8YfQcWP1\nFaqH24V9L4VdgkxY1rf3yFHoFXkHX/PuLUCDcJ6JTKIviev2DCzql/EXS9ao\nj4+E6pt/M6G4vJseg7dseLga5asLWPaUkG5oxNBy586dPjKN76Or4NDubpQF\ncc78NE+JKjMLfPpFyXaq93OAbiM9nAo/A77pueZRmty0E96KSxBUncH6G7B/\nIV2GKtfZOwH87QCdn/wymNEO6v+Cl3RfjkuUASxd3EgxgSvFD2XwM6BGhtyh\nHeqLh2OToGfMcTn7OwvXEeJWzYEe3s/UwLlIuUV/AHacNSOqF1JtGZcELCn1\nkOdH3B8T+T6AkdkWcfOM4xLlhGtW/86vHja5Z1niuVovzDxVWCLM+8FrY+WX\nnHj4CfF3fAwZ19t4F4kz/x9qQktGO3uTYAMuFnfu9p+5QjeXnsj7dZ2I+gme\nKBuZQUJTfQDpIuTggrwr9Zk+xx2ambcsdGEEIn+ScdQtTtK9AcUOULbH4ABl\nO6F94ROKF9gNgQbJ8w43dBvSGukSmhoVjLBZQVM4lQ+DmdDEc4sr17I42ey4\nbisp7J3xJYzMPxfOX3Yyk+zs2/5RzGzygyZFu7gexPeh+feuZ+8l0acb//eN\nsLk0\r\n=wYLl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICbV1C7q6zpY+rNMXxblSJ3JpR/73I9e3MMyURt3SnKZAiEAoMA6QLwCN49O9yLB3ozh6UBCiY0NIVn4/rN45IR0oLg="}],"size":2992695,"noattachment":false,"key":"/idb-connector/-/idb-connector-1.2.9.tgz"},"maintainers":[{"email":"aaronbartell@gmail.com","name":"aaronbartell"},{"email":"mussebiz@gmail.com","name":"abmusse"},{"email":"dmabupt@gmail.com","name":"dmabupt"},{"email":"mirish@ibm.com","name":"markdirish"},{"email":"jgorzinski@gmail.com","name":"theprez"}],"_npmUser":{"name":"dmabupt","email":"dmabupt@gmail.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/idb-connector_1.2.9_1590410479456_0.1360183507506154"},"_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":1590410479714,"_cnpm_publish_time":1590410479714,"dist-tags":{"beta":"1.2.19-beta.0","latest":"1.3.1","rc":"1.3.0-rc.4"}}