{"_id":"@apex-process-consultants/loopback-connector-ibmi","_rev":"3-e63b31bab8a8a76429cdc521f88beb79","name":"@apex-process-consultants/loopback-connector-ibmi","dist-tags":{"latest":"1.0.0-beta.2"},"versions":{"1.0.0-beta.2":{"name":"@apex-process-consultants/loopback-connector-ibmi","version":"1.0.0-beta.2","keywords":["IBM","StrongLoop","LoopBack","DB2","DataSource","Connector","IBM i","odbc","idb-pconnector","idb-connector"],"author":{"name":"IBM Corp."},"license":"Artistic-2.0","_id":"@apex-process-consultants/loopback-connector-ibmi@1.0.0-beta.2","maintainers":[{"name":"aroper","email":"andy.roper@apexbpm.com"},{"name":"dknapp47","email":"david.knapp@apexbpm.com"},{"name":"luke.feiner","email":"luke.feiner@apexbpm.com"},{"name":"kyle2829","email":"kyle2829@gmail.com"},{"name":"jvolpe","email":"jim.volpe@apexbpm.com"},{"name":"robrobinson","email":"rob.robinson@apexbpm.com"},{"name":"nlaughton","email":"nick.laughton@apexbpm.com"},{"name":"ashishad","email":"ashish.gupta@apexbpm.com"},{"name":"apexinfo","email":"info@apexbpm.com"}],"homepage":"https://github.com/Apex-BPM/loopback-connector-ibmi","bugs":{"url":"https://github.com/Apex-BPM/loopback-connector-ibmi/issues"},"dist":{"shasum":"bca5c0ef59153c05ea39c1082337ec13600f610a","tarball":"https://registry.npmjs.org/@apex-process-consultants/loopback-connector-ibmi/-/loopback-connector-ibmi-1.0.0-beta.2.tgz","fileCount":44,"integrity":"sha512-b1Dz4CXcFeoR6vfZQx67gcpejmVPHp0t+VAFMNTtlxJ0/9O/0LeWj7ZcRJdBD8F8fTxjW4zX33FPO/v1FcaJcg==","signatures":[{"sig":"MEYCIQDlvLBsdO+aWOD/wLL4vs1Ti7orgLMSI9SWksKIkYMQegIhAKxTfJ3+/82m/y4Rdqqly6oBCyZieuMdj4EuQDz3VNgr","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":213522,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd78+FCRA9TVsSAnZWagAAC+kP/iZU7GQM5SRsdbpGWHPq\nOMFssRknU1GvZADNT4aR8IvfrfnNmLLY9ox9XYLXpR5aSIJgt2nSUyLt+uQu\n6CIoBJ2pAFWJt6rNp9x2q5wU/FIXdnm7gtOW8N10m3CXPr5g6eG1dDNdRAlq\nA7h7vTYYFnRoUmUJpwLFqxzCn6ORuOMeSnAbu9Hh7onsrBoa1kdee4+u8xaY\nROAleQmhHoL3KW2ys+6FwidQUBG2hf1I7B4T1B2qK95NFIyVzXEb//yCCi/J\n5jQkDBfH2gacDjAeQz7EMt/duKsmh1S6F0Tf9lceTprZsPGyNdeZzFFueyPB\nSx9fz/bvkJBjOA9ZSWoLl71GDddSDiC7xIPlTkSYbBrPQQSEpK7tvv/b6jQm\n5phUU7CEeu89a1blzJ3OA2OEW0+xNYPOJkCwPwqq6XWOLsIGQ18heyBpWuaM\nJSxf+ugAdVS4qj4LXilcPlYBE0dynsHr+kwupPp2uySbCw+TJ6C41uJjjDpG\n3dJZ/sRfh75fnduHt1tdJ2ERzN7L9bgZpkGmY2wm91F6HIsYXrSBx8nz9Hxc\nwj/wDLwq5u/T4iT59J7beWuU20rF0KAEXjLU1j7ioBYu4qZQnOvc9/D2BsL/\n94g3Qj7Vgt+2drYOBLdW7JCRYnfjickVY4su0RSzcHkhh3mym1BFF55tIxGa\nkuZI\r\n=uGJ7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","engines":{"node":">=8"},"gitHead":"fd948f10be55c93c117b69dba1c083576de6d4e1","scripts":{"lint":"eslint .","test":"mocha --timeout 15000 --require test/init.js","posttest":"npm run lint"},"_npmUser":{"name":"dknapp47","email":"david.knapp@apexbpm.com"},"repository":{"url":"git+https://github.com/Apex-BPM/loopback-connector-ibmi.git","type":"git"},"_npmVersion":"6.9.0","description":"LoopBack Connector for Db2 on the IBM i","directories":{},"_nodeVersion":"10.16.0","dependencies":{"odbc":"^2.1.2","async":"^1.5.0","debug":"^2.2.0","strong-globalize":"^2.8.2","loopback-connector":"^4.0.0"},"_hasShrinkwrap":false,"devDependencies":{"rc":"^1.1.5","mocha":"^6.1.4","sinon":"^1.17.2","eslint":"^5.15.3","should":"^8.1.1","bluebird":"^2.9.9","eslint-plugin-import":"^2.16.0","eslint-config-loopback":"^13.0.0","eslint-config-airbnb-base":"^13.1.0","loopback-datasource-juggler":"^2.43.0"},"_npmOperationalInternal":{"tmp":"tmp/loopback-connector-ibmi_1.0.0-beta.2_1575997317432_0.333944044391969","host":"s3://npm-registry-packages"}}},"time":{"created":"2019-12-10T17:01:57.432Z","modified":"2025-09-23T21:51:56.683Z","1.0.0-beta.2":"2019-12-10T17:01:57.556Z"},"bugs":{"url":"https://github.com/Apex-BPM/loopback-connector-ibmi/issues"},"author":{"name":"IBM Corp."},"license":"Artistic-2.0","homepage":"https://github.com/Apex-BPM/loopback-connector-ibmi","keywords":["IBM","StrongLoop","LoopBack","DB2","DataSource","Connector","IBM i","odbc","idb-pconnector","idb-connector"],"repository":{"url":"git+https://github.com/Apex-BPM/loopback-connector-ibmi.git","type":"git"},"description":"LoopBack Connector for Db2 on the IBM i","maintainers":[{"email":"david.knapp@apexbpm.com","name":"dknapp47"},{"email":"luke.feiner@apexbpm.com","name":"luke.feiner"},{"email":"kyle2829@gmail.com","name":"kyle2829"},{"email":"jim.volpe@apexbpm.com","name":"jvolpe"},{"email":"rob.robinson@apexbpm.com","name":"robrobinson"},{"email":"nick.laughton@apexbpm.com","name":"nlaughton"},{"email":"ashish.gupta@apexbpm.com","name":"ashishad"},{"email":"info@apexbpm.com","name":"apexinfo"}],"readme":"# loopback-connector-ibmi\n\nThis is a database connectior for Db2 on IBM i intended for use with LoopBack 3 (LoopBack 4 testing soon). It uses the npm `odbc` package to connect to the database, so installing an ODBC driver manager and driver and setting up a datasource is required for use (see below).\n\n## Major differences from version 0.x of loopback-connector-ibmi\nThis version of the module is significantly different from version 0.x and constitutes a complete rewrite. This project is a derivative of [loopback-connector-db2iseries](https://github.com/strongloop/loopback-connector-db2iseries) and the v0.x [loopback-connector-ibmi](https://github.com/andrescolodrero/loopback-connector-ibmi).\n\nThe main difference between this and the other packages for IBM i (including v0.x of this package) is that it uses ODBC to communicate to the database. Version 0.x of this package was built using the Db2 for i CLI API set, hence the need for important prerequisites (below). \n\n## Prerequisites\nBefore installing this package, you will need an ODBC driver and a driver manager (with development libraries). \nThis package is primarily developed and tested with the IBM i Access ODBC driver, which is supported as part of IBM i software maintenance agreements (SWMA) and comes with no additional licensing fees. \n\n### On IBM i\n- Install the `unixODBC-devel` package. See [the RPM and yum documentation for IBM i](http://ibm.biz/ibmi-rpms) for more detailed steps.\n### On Linux\n- Install the `unixODBC-devel` package with your operating system's package manager (apt-get, zypper, yum, etc).\n- Install the \"Linux Application Package\" of IBM i Access Client Solutions. Consult [this document](http://www-01.ibm.com/support/docview.wss?uid=nas8N1010355) for assistance.\n### On Windows\n- Install the \"Windows Application Package\" of IBM i Access Client Solutions. Consult [this document](http://www-01.ibm.com/support/docview.wss?uid=nas8N1010355) for assistance.\n\n\n## Installation\nOnce the prerequisites are satisfied, enter the following in the top-level directory of your LoopBack application and install this package:\n\n```\n$ npm install loopback-connector-ibmi \n```\n\n## Configuration\n\nIn LoopBack, datasources are used to store the information about your database so it can be used by the program. Use the [data source generator](https://loopback.io/doc/en/lb3/Data-source-generator.html) to add  to your application:\n\n```\nlb datasource\n```\n\nThe datasource generator will then walk you through the process of setting up a datasource:\n1. `Enter the datasource name:` Any name will do, such as the name of the schema you will use or the name of your system.\n2. `Select connector for <name>:` LoopBack 3 does not have knowledge of `loopback-connector-ibmi`, so just press up on the arrow key once and select `other`.\n3. `Enter the connector's module name:` Enter `loopback-connector-ibmi`.\n4. `Install loopback-connector-ibmi`: If you haven't installed it, enter `Y`. If you have already installed it, select `n`.\n\nThis will generate an entry in your `server/datasources.json` file. It should know have an entry similar to:\n\n```json\n  \"test\": {\n    \"name\": \"test\",\n    \"connector\": \"loopback-connector-ibmi\"\n  }\n  ```\nYou should edit this entry to add information on how to connect to Db2. For `loopback-connector-ibmi`, you need to pass either a `connectionString`, or pass your `username`, `password`, and `dsn` (which will be the DSN name you set up for your ODBC driver).\n\n```json\n\"test\": {\n  \"name\": \"test\",\n  \"connector\": \"loopback-connector-ibmi\",\n  \"connectionString\": \"DSN=MYDSN\"\n}\n```\n\nor\n\n```json\n\"test\": {\n  \"name\": \"test\",\n  \"connector\": \"loopback-connector-ibmi\",\n  \"dsn\": \"MYDSN\",\n  \"username\": \"FIRSTLAST\",\n  \"password\": \"password123\"\n}\n```\n\nThe following table describes the connector properties.\n\nProperty| Type | Description\n---| --------| --------\nconnectionString | String  | ODBC connection string for connecting to the database\ndsn            | String  | ODBC DSN to use for the connection\nusername       | String  | Username on the IBM i\npassword       | String  | Password on the IBM i\nschema         | String  | Specifies the default schema name that is used to qualify unqualified database objects in dynamically prepared SQL statements. The schema name is case-sensitive.\n\n**More connector properties will be added as requested by the community**\n\nAlternatively, you can create and configure the data source in JavaScript code.\nFor example:\n\n```JavaScript\nvar DataSource = require('loopback-datasource-juggler').DataSource;\nvar DB2 = require('loopback-connector-ibmi');\n\nvar config = {\n  dsn:      process.env.DSN\n  username: process.env.DB2_USERNAME,\n  password: process.env.DB2_PASSWORD,\n};\n\nvar db = new DataSource(DB2, config);\n\nvar User = db.define('User', {\n  name: { type: String },\n  email: { type: String },\n});\n\n// Will make sure that 'User' table has the same format as the model\ndb.autoupdate('User', function(err) {\n  if (err) {\n    console.log(err);\n    return;\n  }\n\n  User.create({\n    name: 'Tony',\n    email: 'tony@t.com',\n  }, function(err, user) {\n    console.log(err, user);\n  });\n\n  User.find({ where: { name: 'Tony' }}, function(err, users) {\n    console.log(err, users);\n  });\n\n  User.destroyAll(function() {\n    console.log('example complete');\n  });\n});\n```\n","readmeFilename":"README.md"}