You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

multi-db-orm

Package Overview
Dependencies
Maintainers
0
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

multi-db-orm - npm Package Compare versions

Comparing version

to
3.0.2

38

engines/hanadb.js

@@ -5,3 +5,3 @@ const { MultiDbORM } = require("./multidb");

db;
conn;
pool;
dataMap = {

@@ -38,4 +38,4 @@ id: "VARCHAR(50) NOT NULL PRIMARY KEY",

};
this.conn = hana.createConnection();
this.db = this.conn;
this.pool = hana.createPool(this.conn_params);
this.db = this.pool;
this.dbType = "hana";

@@ -49,20 +49,14 @@ this.reqMade = 0;

return new Promise((resolve, reject) => {
let onConnect = function (err) {
if (err) throw err;
that.conn.exec(query, (err, result) => {
if (err) {
reject(err);
} else {
resolve(result);
}
if (that.loglevel > 3) {
console.log("Query", query, "->", result);
}
});
};
if (that.conn.state() == "disconnected") {
that.conn.connect(that.conn_params, onConnect);
} else {
onConnect();
}
var conn = this.pool.getConnection();
conn.exec(query, (err, result) => {
conn.disconnect();
if (err) {
reject(err);
} else {
resolve(result);
}
if (that.loglevel > 3) {
console.log("Query", query, "->", result);
}
});
});

@@ -236,3 +230,3 @@ }

return new Promise((resolve, reject) => {
this.conn.disconnect((err) => {
this.pool.disconnect((err) => {
if (err) {

@@ -239,0 +233,0 @@ reject(err);

{
"name": "multi-db-orm",
"version": "3.0.1",
"version": "3.0.2",
"description": "CRUD , Backup , Restore and Migration library for multiple databases",

@@ -50,2 +50,2 @@ "main": "index.js",

"homepage": "https://github.com/shiveshnavin/multi-db-orm#readme"
}
}