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

mysql-live-select

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mysql-live-select - npm Package Compare versions

Comparing version 0.0.21 to 0.0.22

21

lib/LiveMysql.js

@@ -6,2 +6,5 @@ /* mysql-live-select, MIT License ben@latenightsketches.com

// Maximum duration to wait for Zongji to initialize before timeout error (ms)
var ZONGJI_INIT_TIMEOUT = 1500;
var LiveMysqlSelect = require('./LiveMysqlSelect');

@@ -67,4 +70,20 @@

// Wait for Zongji to be ready before executing callback
var zongjiInitTime = Date.now();
var zongjiReady = function() {
if(zongji.ready === true) {
// Call the callback if it exists and do not keep waiting
callback && callback();
} else {
// Wait for Zongji to be ready
if(Date.now() - zongjiInitTime > ZONGJI_INIT_TIMEOUT) {
// Zongji initialization has exceeded timeout, callback error
callback && callback(new Error('ZONGJI_INIT_TIMEOUT_OCCURED'));
} else {
setTimeout(zongjiReady, 40);
}
}
};
zongji.start(self.zongjiSettings);
if(callback) return callback();
zongjiReady();
});

@@ -71,0 +90,0 @@ }

2

package.json
{
"name": "mysql-live-select",
"version": "0.0.21",
"version": "0.0.22",
"description": "Live updating MySQL SELECT statements",

@@ -5,0 +5,0 @@ "main": "lib/LiveMysql.js",

@@ -245,2 +245,9 @@ /* mysql-live-select, MIT License ben@latenightsketches.com

},
immediate_disconnection: function(test){
var myTest = new LiveMysql(settings, function(error){
myTest.end();
test.ok(typeof error === 'undefined');
test.done();
});
},
error_invalid_connection: function(test){

@@ -247,0 +254,0 @@ var myTest = new LiveMysql({

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