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

mysql-activerecord

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mysql-activerecord - npm Package Compare versions

Comparing version 0.7.4 to 0.8.1

32

index.js

@@ -51,3 +51,3 @@ /**

var connection = new mysql.createClient({
var connection = new mysql.createConnection({
host: settings.server,

@@ -241,3 +241,3 @@ port: settings.port,

this.comma_seperated_arguments = function(set) {
this.comma_separated_arguments = function(set) {
var clause = '';

@@ -254,3 +254,3 @@ if (Object.prototype.toString.call(set) === '[object Array]') {

this.group_by = function(set) {
groupByClause = this.comma_seperated_arguments(set);
groupByClause = this.comma_separated_arguments(set);
return that;

@@ -260,3 +260,3 @@ };

this.order_by = function(set) {
orderByClause = this.comma_seperated_arguments(set);
orderByClause = this.comma_separated_arguments(set);
return that;

@@ -418,5 +418,27 @@ };

var reconnectingTimeout = false;
function handleDisconnect(connectionInstance) {
connectionInstance.on('error', function(err) {
if (!err.fatal || reconnectingTimeout) {
return;
}
if (err.code !== 'PROTOCOL_CONNECTION_LOST' && err.code !== 'ECONNREFUSED') {
throw err;
}
var reconnectingTimeout = setTimeout(function() {
connection = mysql.createConnection(connectionInstance.config);
handleDisconnect(connection);
connection.connect();
}, 2000);
});
}
handleDisconnect(connection);
var that = this;
return this;
}
}

4

package.json
{
"name" : "mysql-activerecord",
"version": "0.7.4",
"version": "0.8.1",
"author": "Martin Tajur <martin@tajur.ee>",

@@ -13,3 +13,3 @@ "description": "MySQL ActiveRecord pattern implementation on top of the mysql module.",

"dependencies": {
"mysql": "0.9.6"
"mysql": "2.0.0-alpha8"
},

@@ -16,0 +16,0 @@ "main" : "./",

@@ -226,3 +226,3 @@ MySQL ActiveRecord Adapter for Node.js

## .connection()
Returns the underlying database connection object, ultimately what https://github.com/felixge/node-mysql .createClient() returns.
Returns the underlying database connection object, ultimately what https://github.com/felixge/node-mysql .createConnection() returns.

@@ -229,0 +229,0 @@

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