Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

idb-pconnector

Package Overview
Dependencies
Maintainers
4
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

idb-pconnector

Promised-based Db2 Connector for IBM i (pre-alpha, NOT PRODUCTION READY)

  • 0.0.4
  • Source
  • npm
  • Socket score

Version published
Maintainers
4
Created
Source

idb-pconnector

Promised-based Db2 Connector for IBM i (pre-alpha, NOT PRODUCTION READY)

The objective of this project is to provide a database connector for Db2 on i that enables usage of the "await" keyword.

Simple example of using a prepared statement to insert some values into a tabe, then querying all contents of that table:

var dba = require("idb-pconnector");
async function runInsertAndSelect() {
    try {
        var dbStmt =  new dba.Connection().connect().getStatement();
        await dbStmt.prepare("INSERT INTO MYSCHEMA.TABLE1 VALUES (?,?)");
        await dbStmt.bind([ [2018,dba.PARM_TYPE_INPUT,2], ['Dog' ,dba.PARM_TYPE_INPUT, 1] ]);
        await dbStmt.execute();
        var res = await dbStmt.exec("SELECT * FROM MYSCHEMA.TABLE1");
        console.log("Select results: "+JSON.stringify(res));
    } catch(dbError) {
        console.log("Error is " + dbError);
        console.log(error.stack);
    } 
}

runInsertAndSelect();


Keywords

FAQs

Package last updated on 16 Feb 2018

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