New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

db2pool

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

db2pool

Basic connection pool wrapper for ibm db2 node.js driver.

  • 0.0.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

To use this, you will need to create a /credentials/ folder in the base of your project. It will contain the necessary credentials to connect to a db2 database. for example:

{
	"database": "dbname",
	"hostname": "db2.server.hostname.com",
	"username": "<userid>",
	"password": "<password>",
	"port": 50602,
	"protocol": "TCPIP",
	"security": "SSL",
	"sslCert": "your ssl cert.pem",
	"maxPoolSize": size,
	"other": ""
}

Also, the package expects the global variable __basedir to be defined to contain the base path of your project.

This connection pool makes use of the ibm_db framework which utilizes the IBM DB2 ODBC driver under the covers. While ODBC may not be the db connectivity method of choice, it is fully functional and works. This is coded in such a fashion that if IBM releases an official DB2 driver for Node.js in the future, it would be relatively easy to swap in to replace the ibm_db framework.

###Usage

####getConnection(dbname) - obtain database connection from the pool

returns - ES6 Promise that resolves to a connection object or an error

####query(connection, query string, query parameters)

connection = connection obtain earlier from getConnection

query string = SQL query to run on DB2

query parameters = values that will be substitute by the the driver into the query ?'s

returns - ES6 Promise that resolves to the results of a query or and error

Keywords

FAQs

Package last updated on 11 May 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc