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

trireme-jdbc

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

trireme-jdbc - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

23

lib/trireme-jdbc-pool.js

@@ -72,3 +72,3 @@ /*

// Pool full -- close!
closeItem(o);
this._closeItem(o);

@@ -95,5 +95,4 @@ } else {

Pool.prototype.discard = function(o) {
closeItem(o, function() {
});
Pool.prototype.discard = function(o, cb) {
this._closeItem(o, cb);
};

@@ -108,3 +107,3 @@

if (o) {
closeItem(o, function() {
self._closeItem(o, function() {
doClose(self, cb);

@@ -127,3 +126,3 @@ });

if (now >= (this.pool[0]._idleTime + this.idleTimeout)) {
closeItem(this.pool.shift());
this._closeItem(this.pool.shift());
} else {

@@ -135,2 +134,14 @@ break;

Pool.prototype._closeItem = function(o, cb) {
var self = this;
if (o.close) {
o.close(function() {
self.allocated--;
if (cb) {
cb();
}
});
}
};
function closeItem(o, cb) {

@@ -137,0 +148,0 @@ if (o.close) {

@@ -85,3 +85,3 @@ /*

max: opts.maxConnections,
idleTimeout: opts.idleTimeout * 1000,
idleTimeout: opts.idleTimeout,
create: function(cb) {

@@ -88,0 +88,0 @@ if (debugEnabled) {

{
"name": "trireme-jdbc",
"version": "1.0.0",
"version": "1.0.1",
"description": "Connect to JDBC databases from inside Trireme",

@@ -10,3 +10,3 @@ "main": "lib/trireme-jdbc.js",

"scripts": {
"test": "trireme mocha -R spec"
"test": "export TRIREME_CLASSPATH=$PWD/drivers/hsqldb-2.3.2.jar; ./node_modules/trireme/bin/trireme node_modules/mocha/bin/mocha -R spec"
},

@@ -31,3 +31,7 @@ "repository": {

"semver": "~4.0.0"
},
"devDependencies": {
"mocha": "^2.0.1",
"trireme": ">0.8.2"
}
}

@@ -266,5 +266,7 @@ # Trireme JDBC

The tests are written in Mocha but won't work because Mocha doesn't support
Node. Instead, do the following:
"npm test" will test this module using the Trireme binary that it depends
on, and also using the HSQLDB driver included with the distribution.
In order to test with another database, do the following:
1. Edit "testconf/config.js" to reflect your database. Default is hsqldb.

@@ -274,3 +276,3 @@ 2. Get your JDBC driver and put it somewhere. For instance, the "drivers" directory.

JDBC driver JAR from the previous step.
4. Run "mocha" with "trireme" rather than just running mocha. Better to show that...
4. Run "mocha" with "trireme" rather than just running mocha.

@@ -277,0 +279,0 @@ For example:

Sorry, the diff of this file is not supported yet

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