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

mysql-simple-query

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mysql-simple-query - npm Package Compare versions

Comparing version 1.0.14 to 1.0.15

9

lib/mysqlSimpleQuery.js

@@ -12,2 +12,3 @@ const dbQuery = require('./util/dbQuery');

this.whereBetweenStatement = {};
this.whereCondition = null;
this.whereLikeCondition = null;

@@ -41,5 +42,9 @@ this.groupByStatement = '';

where(key, value) {
where(key, value, condition) {
this.whereStatement[key] = value;
this.whereConditionUsed = true;
if (condition) {
this.whereCondition = condition;
}
}

@@ -61,3 +66,3 @@

if (!isEmpty(this.whereStatement)) {
return dbQuery.parseWhere(this.whereStatement);
return dbQuery.parseWhere(this.whereStatement, this.whereCondition);
}

@@ -64,0 +69,0 @@

@@ -42,3 +42,3 @@ const select = select => {

const parseWhere = whereObject => {
const parseWhere = (whereObject, orStatement = false) => {
let whereStatement = [];

@@ -51,2 +51,6 @@

if (orStatement) {
return `WHERE ${whereStatement.join(' OR ')}`;
}
return `WHERE ${whereStatement.join(' AND ')}`;

@@ -53,0 +57,0 @@ };

{
"name": "mysql-simple-query",
"version": "1.0.14",
"version": "1.0.15",
"description": "Simple query wrapper for mysql-promise to make querying, inserting, updating, and deleting easier for developers.",

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

@@ -13,2 +13,3 @@ const dbQuery = require('./util/dbQuery');

this.whereBetweenStatement = {};
this.whereCondition = null;
this.whereLikeCondition = null;

@@ -42,5 +43,9 @@ this.groupByStatement = '';

where(key, value) {
where(key, value, condition) {
this.whereStatement[key] = value;
this.whereConditionUsed = true;
if (condition) {
this.whereCondition = condition;
}
}

@@ -62,3 +67,3 @@

if(!isEmpty(this.whereStatement)) {
return dbQuery.parseWhere(this.whereStatement);
return dbQuery.parseWhere(this.whereStatement, this.whereCondition);
}

@@ -65,0 +70,0 @@

@@ -47,3 +47,3 @@ const select = (select) => {

const parseWhere = (whereObject) => {
const parseWhere = (whereObject, orStatement = false) => {
let whereStatement = [];

@@ -56,2 +56,6 @@

if (orStatement) {
return `WHERE ${whereStatement.join(' OR ')}`;
}
return `WHERE ${whereStatement.join(' AND ')}`;

@@ -58,0 +62,0 @@ };

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