JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q40035F
  • License MIT

DB2 adapter for Sails / Waterline

Package Exports

  • sails-db2

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (sails-db2) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Sails-DB2 Adapter

IBM DB2 adapter for the Sails framework and Waterline ORM. Allows you to use DB2 via your models to store and retrieve data. Also provides a query() method for a direct interface to execute raw SQL commands.

Installation

Sails-DB2 uses ibm_db driver to interact with the db, so install it first.

Then, install this adapter via NPM:

$ npm install sails-db2

Sails Configuration

Add the db2 config to the config/adapters.js file. Basic options:

module.exports.adapters = {
  default: 'db2',

  db2: {
    module   : 'sails-db2',
    host     : 'localhost',
    port     : 50000,
    user     : 'username',
    password : 'password',
    database : 'DB2 Database Name',
    schemaDB2: 'my_schema'
  }
};