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.8.2 to 0.8.3

38

index.js

@@ -34,4 +34,11 @@ /**

var mysql = require('mysql');
if (!settings.server) {
if(settings.server) {
settings.host = settings.server;
}
if(settings.username) {
settings.user = settings.username;
}
if (!settings.host) {
throw new Error('Unable to start ActiveRecord - no server given.');

@@ -42,4 +49,4 @@ }

}
if (!settings.username) {
settings.username = '';
if (!settings.user) {
settings.user = '';
}

@@ -53,9 +60,3 @@ if (!settings.password) {

var connection = new mysql.createConnection({
host: settings.server,
port: settings.port,
user: settings.username,
password: settings.password,
database: settings.database
});
var connection = new mysql.createConnection(settings);

@@ -212,3 +213,8 @@ if (settings.charset) {

connection.query(combinedQueryString, function(err, res) { responseCallback(null, res[0]['count'])});
connection.query(combinedQueryString, function(err, res) {
if (err)
responseCallback(err, null);
else
responseCallback(null, res[0]['count']);
});
resetQuery(combinedQueryString);

@@ -263,3 +269,3 @@ }

this.having = function(set) {
havingClause = this.comma_seperated_arguments(set);
havingClause = this.comma_separated_arguments(set);
return that;

@@ -289,6 +295,6 @@ };

this.insert = function(tableName, dataSet, responseCallback, verb, querySuffix) {
if (typeof verb === 'undefined') {
var verb = 'INSERT';
}
if (Object.prototype.toString.call(dataSet) !== '[object Array]') {
if (typeof verb === 'undefined') {
var verb = 'INSERT';
}
if (typeof querySuffix === 'undefined') {

@@ -295,0 +301,0 @@ var querySuffix = '';

{
"name" : "mysql-activerecord",
"version": "0.8.2",
"version": "0.8.3",
"author": "Martin Tajur <martin@tajur.ee>",

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

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