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

jeefo-mysql

Package Overview
Dependencies
Maintainers
2
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jeefo-mysql - npm Package Compare versions

Comparing version 0.0.40 to 0.0.41

17

index.js
/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
* File Name : index.js
* Created at : 2021-10-09
* Updated at : 2021-12-16
* Updated at : 2021-12-22
* Author : jeefo

@@ -49,3 +49,3 @@ * Purpose :

this.connection.on("error", err => {
console.error("MYSQL Error:", err);
console.error("MYSQL Error:", err);
});

@@ -96,6 +96,6 @@ });

async insert(data, return_back) {
const fields = this.prepare_set(data);
const {fields, values} = this.prepare_set(data);
const query = `INSERT INTO ${this.table_name} SET ${fields};`;
const res = await this.exec(query);
const res = await this.exec(query, values);

@@ -138,3 +138,4 @@ return (

prepare_set(data) {
return Object.keys(data).map(key => {
const values = [];
const fields = Object.keys(data).map(key => {
let value = data[key];

@@ -146,5 +147,7 @@ if (is.object(value) && !(value instanceof Date)) {

}
key = mysql.escapeId(key);
return `${key} = ${value}`;
values.push(value);
return `${mysql.escapeId(key)} = ?`;
}).join(", ");
return {fields, values};
}

@@ -151,0 +154,0 @@

{
"name": "jeefo-mysql",
"version": "0.0.40",
"version": "0.0.41",
"description": "Very simple MySQL connection instances for each table. I had annoyed enough for MySQL Deadlocks.",

@@ -5,0 +5,0 @@ "main": "index.js",

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